Default to building without the legacy APIs, now GNUstep doesn't require them.

main
theraven 15 years ago
parent 32e6715106
commit 24de067017

@ -45,7 +45,7 @@ libobjc_C_FILES = \
libobjcxx_CC_FILES = objcxx_eh.cc libobjcxx_CC_FILES = objcxx_eh.cc
libobjcxx_LDFLAGS = -L./obj/$(GNUSTEP_TARGET_LDIR)/ -lstdc++ -lobjc libobjcxx_LDFLAGS = -L./obj/$(GNUSTEP_TARGET_LDIR)/ -lstdc++ -lobjc
ifeq ($(disable_legacy), yes) ifneq ($(enable_legacy), yes)
libobjc_C_FILES += legacy_malloc.c libobjc_C_FILES += legacy_malloc.c
libobjc_CPPFLAGS += -DNO_LEGACY libobjc_CPPFLAGS += -DNO_LEGACY
endif endif

@ -54,7 +54,8 @@ static uint32_t get_untyped_idx(SEL aSel)
/** /**
* Returns whether a selector is mapped. * Returns whether a selector is mapped.
*/ */
BOOL sel_is_mapped(SEL selector); BOOL isSelRegistered(SEL sel);
/** /**
* Registers the selector. This selector may be returned later, so it must not * Registers the selector. This selector may be returned later, so it must not
* be freed. * be freed.

@ -46,8 +46,7 @@ static SparseArray *selector_list = NULL;
// Get the functions for string hashing // Get the functions for string hashing
#include "string_hash.h" #include "string_hash.h"
PRIVATE inline BOOL isSelRegistered(SEL sel)
inline static BOOL isSelRegistered(SEL sel)
{ {
if ((uintptr_t)sel->name < (uintptr_t)selector_count) if ((uintptr_t)sel->name < (uintptr_t)selector_count)
{ {

@ -77,7 +77,7 @@ retry:;
} }
if (0 == result) if (0 == result)
{ {
if (!sel_is_mapped(selector)) if (!isSelRegistered(selector))
{ {
objc_register_selector(selector); objc_register_selector(selector);
// This should be a tail call, but GCC is stupid and won't let // This should be a tail call, but GCC is stupid and won't let
@ -272,7 +272,7 @@ Slot_t objc_get_slot(Class cls, SEL selector)
} }
if (NULL == result) if (NULL == result)
{ {
if (!sel_is_mapped(selector)) if (!isSelRegistered(selector))
{ {
objc_register_selector(selector); objc_register_selector(selector);
return objc_get_slot(cls, selector); return objc_get_slot(cls, selector);

Loading…
Cancel
Save