diff --git a/Source/ObjectiveC2/runtime.c b/Source/ObjectiveC2/runtime.c index da7ad694e..298bff523 100644 --- a/Source/ObjectiveC2/runtime.c +++ b/Source/ObjectiveC2/runtime.c @@ -1317,3 +1317,29 @@ sel_registerName(const char *selName) return 0; return sel_register_name(selName); } + +SEL sel_registerTypedName_np(const char *selName, const char *types) +{ + SEL s; + + if (types == 0) + { + s = sel_get_any_typed_uid(name); + } + else + { + s = sel_get_typed_uid(name, types); + } + if (s == 0) + { + if (types == 0) + { + s = sel_register_name(name); + } + else + { + s = sel_register_typed_name(name, types); + } + } + return s; +} diff --git a/Source/ObjectiveC2/runtime.h b/Source/ObjectiveC2/runtime.h index 8ac5a394b..03a6600e7 100644 --- a/Source/ObjectiveC2/runtime.h +++ b/Source/ObjectiveC2/runtime.h @@ -299,4 +299,6 @@ BOOL sel_isEqual(SEL sel1, SEL sel2); SEL sel_registerName(const char *selName); +SEL sel_registerTypedName_np(const char *selName, const char *types); + #endif // __OBJECTIVEC2_RUNTIME_H_INCLUDED