From 381f43eb7252f71b9056535e33f3a3ec31bbf967 Mon Sep 17 00:00:00 2001 From: thebeing Date: Mon, 19 Jul 2010 09:11:07 +0000 Subject: [PATCH] Add sel_getType_np() function to the ObjectiveC2 compatibility framework. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31001 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/ObjectiveC2/runtime.c | 10 +++++++++- Source/ObjectiveC2/runtime.h | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) 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);