Add hacks for Darwin

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9764 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-05-03 15:40:25 +00:00
parent df02b63f80
commit d49f630b86
3 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2001-05-03 Adam Fedor <fedor@gnu.org>
* Headers/gnustep/base/objc-gnu2next.h: Add sel_register_name
* Source/behavior.m: Add define hacks for Darwin.
2001-05-03 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject: ([+initialize]) Move GSSetLocale() after platform

View file

@ -55,6 +55,7 @@
#define sel_get_any_uid sel_getUid
#define objc_get_class objc_getClass
#define class_get_version class_getVersion
#define sel_register_name sel_registerName
#define sel_is_mapped sel_isMapped
#define class_get_class_name(CLASSPOINTER) \

View file

@ -54,6 +54,12 @@
#include <base/behavior.h>
#include <Foundation/NSException.h>
/* Darwin behavior */
#if !defined(Release3CompatibilityBuild)
#define methods methodLists
#define method_next obsolete
#endif
static struct objc_method *search_for_method_in_list (struct objc_method_list * list, SEL op);
static BOOL class_is_kind_of(Class self, Class class);
@ -73,6 +79,10 @@ behavior_class_add_class (Class class, Class behavior)
NSCAssert(CLS_ISCLASS(class), NSInvalidArgumentException);
NSCAssert(CLS_ISCLASS(behavior), NSInvalidArgumentException);
#if NeXT_RUNTIME
NSCAssert(class->instance_size >= behavior->instance_size,
@"Trying to add behavior with instance size larger than class");
#else
/* If necessary, increase instance_size of CLASS. */
if (class->instance_size < behavior->instance_size)
{
@ -85,6 +95,7 @@ behavior_class_add_class (Class class, Class behavior)
@"will not have to increase the instance size\n");
class->instance_size = behavior->instance_size;
}
#endif
if (behavior_debug)
{