diff --git a/Headers/Additions/GNUstepBase/GSObjCRuntime.h b/Headers/Additions/GNUstepBase/GSObjCRuntime.h
index 4f93e2768..d778b1304 100644
--- a/Headers/Additions/GNUstepBase/GSObjCRuntime.h
+++ b/Headers/Additions/GNUstepBase/GSObjCRuntime.h
@@ -281,18 +281,19 @@ GS_EXPORT SEL
GSSelectorFromName(const char *name);
/**
- * Return the selector for the specified name and types. Returns a nul
- * pointer if the name is nul. Uses any available selector if the types
- * argument is nul.
- * Creates a new selector if necessary.
+ * Return the selector for the specified name and types.
+ * Returns a nul pointer if the name is nul.
+ * Creates a new selector if necessary.
+ * Code must NOT rely on this providing a selector with type information.
*/
GS_EXPORT SEL
GSSelectorFromNameAndTypes(const char *name, const char *types);
/**
- * Return the type information from the specified selector.
+ * Return the type information from the specified selector.
* May return a nul pointer if the selector was a nul pointer or if it
- * was not typed.
+ * was not typed (or if the runtime does not support typed selectors).
+ * Code must NOT rely on this providing any type information.
*/
GS_EXPORT const char *
GSTypesFromSelector(SEL sel);
diff --git a/Source/Additions/GSObjCRuntime.m b/Source/Additions/GSObjCRuntime.m
index 65454586c..849e354b1 100644
--- a/Source/Additions/GSObjCRuntime.m
+++ b/Source/Additions/GSObjCRuntime.m
@@ -137,11 +137,16 @@ GSSelectorFromName(const char *name)
{
return sel_getUid(name);
}
+
SEL
GSSelectorFromNameAndTypes(const char *name, const char *types)
{
#if NeXT_RUNTIME
return sel_getUid(name);
+#elif defined (__GNU_LIBOBJC__)
+ return sel_registerTypedName(name, types);
+#elif defined (__GNUSTEP_RUNTIME__)
+ return sel_registerTypedName_np(name, types);
#else
if (name == 0)
{
@@ -174,11 +179,16 @@ GSSelectorFromNameAndTypes(const char *name, const char *types)
}
#endif
}
+
const char *
GSTypesFromSelector(SEL sel)
{
#if NeXT_RUNTIME
return 0;
+#elif defined (__GNU_LIBOBJC__)
+ return sel_getTypes(name);
+#elif defined (__GNUSTEP_RUNTIME__)
+ return sel_getType_np(name);
#else
if (sel == 0)
{
@@ -190,6 +200,7 @@ GSTypesFromSelector(SEL sel)
}
#endif
}
+
void
GSFlushMethodCacheForClass (Class cls)
{