diff --git a/ChangeLog b/ChangeLog index 7438630a2..398566e3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-07-19 Niels Grewe + + * Source/ObjectiveC2/runtime.c: + * Source/ObjectiveC2/runtime.h: + Add sel_getType_np(), which just calls sel_get_type(). + 2010-07-19 Richard Frith-Macdonald * Source/NSPathUtilities.m: User domain handling improvements. diff --git a/Source/ObjectiveC2/runtime.c b/Source/ObjectiveC2/runtime.c index 488d69e42..c042580d7 100644 --- a/Source/ObjectiveC2/runtime.c +++ b/Source/ObjectiveC2/runtime.c @@ -95,7 +95,7 @@ skip_argspec(const char *types) return types; } -/** +/** * Looks up the instance method in a specific class, without recursing into * superclasses. */ @@ -1140,6 +1140,14 @@ sel_getName(SEL sel) return sel_get_name(sel); } +const char * +sel_getType_np(SEL sel) +{ + if (sel == 0) + return ""; + return sel_get_type(sel); +} + SEL sel_getUid(const char *selName) { diff --git a/Source/ObjectiveC2/runtime.h b/Source/ObjectiveC2/runtime.h index 61beae6d7..e24a4942b 100644 --- a/Source/ObjectiveC2/runtime.h +++ b/Source/ObjectiveC2/runtime.h @@ -292,6 +292,8 @@ static const id self = nil; const char *sel_getName(SEL sel); +const char *sel_getType_np(SEL sel); + SEL sel_getUid(const char *selName); BOOL sel_isEqual(SEL sel1, SEL sel2);