+2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * selector.c (sel_getName): Return "<null selector>" for a NULL
+ argument.
+ (sel_get_name): Return 0 for a NULL argument.
+ * objc/runtime.h (sel_getName): Updated documentation.
+
+ * objc-private/hash.h (class_hash_table): Unused declaration
+ removed.
+ (module_hash_table): Same.
+ * objc/deprecated/hash.h: Same changes.
+
2010-10-11 Nicola Pero <nicola.pero@meta-innovation.com>
* class.c (objc_getClassList): New.
} *cache_ptr;
-/* Two important hash tables. */
-extern cache_ptr module_hash_table, class_hash_table;
-
/* Allocate and initialize a hash table. */
cache_ptr objc_hash_new (unsigned int size,
} *cache_ptr;
-/* Two important hash tables. */
-extern cache_ptr module_hash_table, class_hash_table;
-
/* Allocate and initialize a hash table. */
cache_ptr objc_hash_new (unsigned int size,
/** Implementation: the following functions are in selector.c. */
-/* Return the name of a given selector. */
+/* Return the name of a given selector. If 'selector' is NULL, return
+ "<null selector>". */
objc_EXPORT const char *sel_getName (SEL selector);
/* Return the type of a given selector.
{
const char *ret;
+ if (selector == NULL)
+ return "<null selector>";
+
objc_mutex_lock (__objc_runtime_mutex);
if ((soffset_decode ((sidx)selector->sel_id) > 0)
&& (soffset_decode ((sidx)selector->sel_id) <= __objc_selector_max_index))
/* Traditional GNU Objective-C Runtime API. */
const char *sel_get_name (SEL selector)
{
+ if (selector == NULL)
+ return 0;
+
return sel_getName (selector);
}