Return NULL instead of "" from sel_getTypes_np() - matches behaviour of sel_get_types() and makes more sense.

This commit is contained in:
theraven 2010-05-19 12:56:46 +00:00
parent ded142ebff
commit c40f9e84f2
2 changed files with 12 additions and 5 deletions

View File

@ -8,18 +8,25 @@
SparseArray *__objc_uninstalled_dtable;
/**
* Structure for maintaining a linked list of temporary dtables. When sending
* an +initialize message to a class, we create a temporary dtables and store
* it in a linked list. This is then used when sending other messages to
* instances of classes in the middle of initialisation.
*/
typedef struct _InitializingDtable
{
/** The class that owns the dtable. */
Class class;
/** The dtable for this class. */
void *dtable;
/** The next uninstalled dtable in the list. */
struct _InitializingDtable *next;
} InitializingDtable;
/** Protected by initialize_lock */
/** Head of the list of temporary dtables. Protected by initialize_lock. */
InitializingDtable *temporary_dtables;
static SparseArray *create_dtable_for_class (Class class);
static uint32_t dtable_depth = 8;
void __objc_init_dispatch_tables ()

View File

@ -273,7 +273,7 @@ SEL sel_registerTypedName_np(const char *selName, const char *types)
const char *sel_getType_np(SEL aSel)
{
return (NULL == aSel->types) ? "" : aSel->types;
return aSel->types;
}