diff --git a/GNUmakefile b/GNUmakefile index 4472d3d..820e6b4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -45,7 +45,7 @@ libobjc_C_FILES = \ libobjcxx_CC_FILES = objcxx_eh.cc libobjcxx_LDFLAGS = -L./obj/$(GNUSTEP_TARGET_LDIR)/ -lstdc++ -lobjc -ifeq ($(disable_legacy), yes) +ifneq ($(enable_legacy), yes) libobjc_C_FILES += legacy_malloc.c libobjc_CPPFLAGS += -DNO_LEGACY endif diff --git a/selector.h b/selector.h index 0b9dc1c..5a7d08c 100644 --- a/selector.h +++ b/selector.h @@ -54,7 +54,8 @@ static uint32_t get_untyped_idx(SEL aSel) /** * 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 * be freed. diff --git a/selector_table.c b/selector_table.c index 9add1f1..0c0922d 100644 --- a/selector_table.c +++ b/selector_table.c @@ -46,8 +46,7 @@ static SparseArray *selector_list = NULL; // Get the functions for string hashing #include "string_hash.h" - -inline static BOOL isSelRegistered(SEL sel) +PRIVATE inline BOOL isSelRegistered(SEL sel) { if ((uintptr_t)sel->name < (uintptr_t)selector_count) { diff --git a/sendmsg2.c b/sendmsg2.c index ce43c75..4e83003 100644 --- a/sendmsg2.c +++ b/sendmsg2.c @@ -77,7 +77,7 @@ retry:; } if (0 == result) { - if (!sel_is_mapped(selector)) + if (!isSelRegistered(selector)) { objc_register_selector(selector); // 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 (!sel_is_mapped(selector)) + if (!isSelRegistered(selector)) { objc_register_selector(selector); return objc_get_slot(cls, selector);