* Headers/gnustep/base/GSObjCRuntime.h

* Source/Additions/GSObjCRuntime.m : White space patch to better
	conform with GNU coding standards and improve readability.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16878 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ayers 2003-06-07 09:45:51 +00:00
parent 0e59d4552d
commit 2fd808651a
3 changed files with 73 additions and 44 deletions

View file

@ -1,3 +1,9 @@
2003-06-07 David Ayers <d.ayers@inode.at>
* Headers/gnustep/base/GSObjCRuntime.h
* Source/Additions/GSObjCRuntime.m : White space patch to better
conform with GNU coding standards and improve readability.
2003-06-06 David Ayers <d.ayers@inode.at>
* Source/GSArray.m: Change syntax of include <> to "" for

View file

@ -73,43 +73,63 @@
* Get the type encoding for a named ivar,
* and copy a value into an ivar.
*/
GS_EXPORT BOOL GSObjCFindVariable(id obj, const char *name,
GS_EXPORT BOOL
GSObjCFindVariable(id obj, const char *name,
const char **type, unsigned int *size, int *offset);
GS_EXPORT void GSObjCGetVariable(id obj, int offset, unsigned int size,
void *data);
GS_EXPORT void GSObjCSetVariable(id obj, int offset, unsigned int size,
const void *data);
GS_EXPORT NSArray* GSObjCMethodNames(id obj);
GS_EXPORT NSArray* GSObjCVariableNames(id obj);
GS_EXPORT void GSObjCAddClassBehavior(Class receiver, Class behavior);
GS_EXPORT void
GSObjCGetVariable(id obj, int offset, unsigned int size, void *data);
GS_EXPORT NSValue*
GS_EXPORT void
GSObjCSetVariable(id obj, int offset, unsigned int size, const void *data);
GS_EXPORT NSArray *
GSObjCMethodNames(id obj);
GS_EXPORT NSArray *
GSObjCVariableNames(id obj);
GS_EXPORT void
GSObjCAddClassBehavior(Class receiver, Class behavior);
GS_EXPORT NSValue *
GSObjCMakeClass(NSString *name, NSString *superName, NSDictionary *iVars);
GS_EXPORT void GSObjCAddClasses(NSArray *classes);
GS_EXPORT void
GSObjCAddClasses(NSArray *classes);
/*
* Functions for key-value encoding ... they access values in an object
* either by selector or directly, but do so using NSNumber for the
* scalar types of data.
*/
GS_EXPORT id GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
GS_EXPORT id
GSObjCGetValue(NSObject *self, NSString *key, SEL sel,
const char *type, unsigned size, int offset);
GS_EXPORT void GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
GS_EXPORT void
GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel,
const char *type, unsigned size, int offset);
/*
* The next five are old (deprecated) names for the same thing.
*/
GS_EXPORT BOOL GSFindInstanceVariable(id obj, const char *name,
GS_EXPORT BOOL
GSFindInstanceVariable(id obj, const char *name,
const char **type, unsigned int *size, int *offset);
GS_EXPORT void GSGetVariable(id obj, int offset, unsigned int size,
void *data);
GS_EXPORT void GSSetVariable(id obj, int offset, unsigned int size,
const void *data);
GS_EXPORT id GSGetValue(NSObject *self, NSString *key, SEL sel,
GS_EXPORT void
GSGetVariable(id obj, int offset, unsigned int size, void *data);
GS_EXPORT void
GSSetVariable(id obj, int offset, unsigned int size, const void *data);
GS_EXPORT id
GSGetValue(NSObject *self, NSString *key, SEL sel,
const char *type, unsigned size, int offset);
GS_EXPORT void GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
GS_EXPORT void
GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
const char *type, unsigned size, int offset);
#include <gnustep/base/objc-gnu2next.h>
@ -197,7 +217,7 @@ GSClassFromName(const char *name)
* Return the name of the supplied class, or a nul pointer if no class
* was supplied.
*/
GS_STATIC_INLINE const char*
GS_STATIC_INLINE const char *
GSNameFromClass(Class this)
{
if (this == 0)
@ -209,7 +229,7 @@ GSNameFromClass(Class this)
* Return the name of the supplied selector, or a nul pointer if no selector
* was supplied.
*/
GS_STATIC_INLINE const char*
GS_STATIC_INLINE const char *
GSNameFromSelector(SEL this)
{
if (this == 0)
@ -281,7 +301,7 @@ GSSelectorFromNameAndTypes(const char *name, const char *types)
* May return a nul pointer if the selector was a nul pointer or if it
* was not typed.
*/
GS_STATIC_INLINE const char*
GS_STATIC_INLINE const char *
GSTypesFromSelector(SEL this)
{
if (this == 0)
@ -311,15 +331,18 @@ GSObjCVersion(Class this)
#include <Foundation/Foundation.h>
#endif
GS_EXPORT NSZone *GSObjCZone(NSObject *obj);
GS_EXPORT NSZone *
GSObjCZone(NSObject *obj);
/**
* Quickly return autoreleased data storage area.
*/
GS_EXPORT void *GSAutoreleasedBuffer(unsigned size);
GS_EXPORT void *
GSAutoreleasedBuffer(unsigned size);
/* Getting a system error message on a variety of systems */
GS_EXPORT const char *GSLastErrorStr(long error_id);
GS_EXPORT const char *
GSLastErrorStr(long error_id);

View file

@ -114,7 +114,7 @@ GSObjCFindVariable(id obj, const char *name,
* If obj is a class, this returns the class methods.<br />
* Returns nil if obj is nil.
*/
NSArray*
NSArray *
GSObjCMethodNames(id obj)
{
NSMutableSet *set;
@ -190,7 +190,7 @@ GSObjCMethodNames(id obj)
* belong to the class of obj or one of its superclasses.<br />
* Returns nil if obj is nil.
*/
NSArray*
NSArray *
GSObjCVariableNames(id obj)
{
NSMutableArray *array;
@ -283,7 +283,7 @@ ObjcRuntimeUtilities.m by Nicola Pero
* <p>The iVars dictionary lists the instance variable names and their types.
* </p>
*/
NSValue*
NSValue *
GSObjCMakeClass(NSString *name, NSString *superName, NSDictionary *iVars)
{
Class newClass;
@ -1535,10 +1535,10 @@ LPTSTR GetErrorMsg(DWORD msgId)
}
#else
#ifndef HAVE_STRERROR
const char*
const char *
strerror(int eno)
{
extern char* sys_errlist[];
extern char *sys_errlist[];
extern int sys_nerr;
if (eno < 0 || eno >= sys_nerr)