summaryrefslogtreecommitdiff
path: root/Objective-C
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-10 16:39:39 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-10 16:39:39 +0100
commit1d410434fefeef5ac26fc188eb31d69d922278ac (patch)
tree7896eb0fe483a9448c9b87beaf2281f0c1b580de /Objective-C
parent213ad2e9ce5aff9337234be84635e1a7ba22a598 (diff)
Glue layer: Add functions for class creation.
darcs-hash:e2dad7f45636d2065160cadec47f805f286a5bc7
Diffstat (limited to 'Objective-C')
-rw-r--r--Objective-C/libobjcl.h2
-rw-r--r--Objective-C/libobjcl.m9
2 files changed, 7 insertions, 4 deletions
diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h
index 56654fc..4a7137e 100644
--- a/Objective-C/libobjcl.h
+++ b/Objective-C/libobjcl.h
@@ -179,7 +179,7 @@ objcl_initialise_lock (void **lock);
Class
objcl_create_class (const char *class_name,
- const char *superclass,
+ Class superclass,
int protocol_number,
const char *protocol_names[],
int ivar_number,
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m
index 94a3663..92fc3cf 100644
--- a/Objective-C/libobjcl.m
+++ b/Objective-C/libobjcl.m
@@ -649,7 +649,7 @@ objcl_release_lock (void *lock)
Class
objcl_create_class (const char *class_name,
- const char *superclass,
+ Class superclass,
int protocol_number,
const char *protocol_names[],
int ivar_number,
@@ -660,7 +660,7 @@ objcl_create_class (const char *class_name,
int i;
Class class;
- objc_allocateClassPair (objcl_find_class (superclass), class_name, 0);
+ objc_allocateClassPair (superclass, class_name, 0);
class = objcl_find_class (class_name);
for (i = 0; i < ivar_number; i++)
@@ -689,6 +689,7 @@ objcl_create_class (const char *class_name,
void *argv[3 + ivar_number*2];
int i;
BOOL return_value;
+ const char *superclass_name;
arg_types[0] = &ffi_type_pointer;
arg_types[1] = &ffi_type_pointer;
@@ -696,8 +697,10 @@ objcl_create_class (const char *class_name,
for (i = 0; i < ivar_number*2; i++)
arg_types[3 + i] = &ffi_type_pointer;
+ superclass_name = objcl_class_name (superclass);
+
argv[0] = &class_name;
- argv[1] = &superclass;
+ argv[1] = &superclass_name;
argv[2] = &ivar_number;
for (i = 0; i < ivar_number; i++)
{