mirror of
https://github.com/darlinghq/darling-libobjc2.git
synced 2024-11-27 14:10:33 +00:00
Small cleanups from last commit.
This commit is contained in:
parent
8ce32fd1c9
commit
0abdc2a574
@ -27,7 +27,7 @@ static void createNSBlockSubclass(Class superclass, Class newClass,
|
||||
|
||||
// Set up the new class
|
||||
newClass->class_pointer = metaClass;
|
||||
newClass->super_class = superclass->name;
|
||||
newClass->super_class = (Class)superclass->name;
|
||||
newClass->name = name;
|
||||
newClass->info = _CLS_CLASS;
|
||||
newClass->dtable = __objc_uninstalled_dtable;
|
||||
|
@ -66,7 +66,7 @@ void __objc_init_class_tables(void)
|
||||
class_table = class_table_internal_create(16);
|
||||
}
|
||||
|
||||
static void objc_resolve_class(Class cls)
|
||||
void objc_resolve_class(Class cls)
|
||||
{
|
||||
// Skip this if the class is already resolved.
|
||||
if (CLS_ISRESOLV(cls)) { return; }
|
||||
|
@ -856,7 +856,7 @@ const char *object_getClassName(id obj)
|
||||
}
|
||||
|
||||
void __objc_add_class_to_hash(Class cls);
|
||||
void __objc_resolve_class_links(void);
|
||||
void objc_resolve_class(Class cls);
|
||||
|
||||
void objc_registerClassPair(Class cls)
|
||||
{
|
||||
@ -865,8 +865,8 @@ void objc_registerClassPair(Class cls)
|
||||
__objc_update_dispatch_table_for_class(metaClass);
|
||||
__objc_update_dispatch_table_for_class(cls);
|
||||
__objc_add_class_to_hash(cls);
|
||||
// Add pointer from super class
|
||||
__objc_resolve_class_links();
|
||||
objc_resolve_class(cls);
|
||||
|
||||
}
|
||||
|
||||
static id objectNew(id cls)
|
||||
|
18
sendmsg.c
18
sendmsg.c
@ -30,19 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#include "objc/encoding.h"
|
||||
#include "lock.h"
|
||||
|
||||
/* This is how we hack STRUCT_VALUE to be 1 or 0. */
|
||||
#define gen_rtx(args...) 1
|
||||
#define gen_rtx_MEM(args...) 1
|
||||
#define gen_rtx_REG(args...) 1
|
||||
/* Alread defined in gcc/coretypes.h. So prevent double definition warning. */
|
||||
#undef rtx
|
||||
#define rtx int
|
||||
|
||||
#if ! defined (STRUCT_VALUE) || STRUCT_VALUE == 0
|
||||
#define INVISIBLE_STRUCT_RETURN 1
|
||||
#else
|
||||
#define INVISIBLE_STRUCT_RETURN 0
|
||||
#endif
|
||||
void objc_resolve_class(Class);
|
||||
|
||||
/* The uninstalled dispatch table */
|
||||
struct sarray *__objc_uninstalled_dtable = 0; /* !T:MUTEX */
|
||||
@ -414,7 +402,7 @@ __objc_send_initialize (Class class)
|
||||
* held so that we can create the premature dtable. */
|
||||
LOCK(&initialize_lock);
|
||||
if (! CLS_ISRESOLV (class))
|
||||
__objc_resolve_class_links ();
|
||||
objc_resolve_class(class);
|
||||
|
||||
|
||||
/* Create the garbage collector type memory description */
|
||||
@ -555,7 +543,7 @@ static struct sarray *create_dtable_for_class (Class class)
|
||||
/* If the class has not yet had its class links resolved, we must
|
||||
re-compute all class links */
|
||||
if (! CLS_ISRESOLV (class))
|
||||
__objc_resolve_class_links ();
|
||||
objc_resolve_class(class);
|
||||
|
||||
super = class->super_class;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user