classinfo_register now allocates space for the interface list
authorkramm <kramm>
Tue, 30 Dec 2008 23:02:28 +0000 (23:02 +0000)
committerkramm <kramm>
Tue, 30 Dec 2008 23:02:28 +0000 (23:02 +0000)
lib/as3/registry.c
lib/as3/registry.h

index 7b6d690..2263038 100644 (file)
@@ -81,9 +81,10 @@ type_t memberinfo_type = {
 // ------------------------- constructors --------------------------------
 
 #define AVERAGE_NUMBER_OF_MEMBERS 8
-classinfo_t* classinfo_register(int access, char*package, char*name)
+classinfo_t* classinfo_register(int access, char*package, char*name, int num_interfaces)
 {
-    NEW(classinfo_t,c);
+    classinfo_t*c = rfx_calloc(sizeof(classinfo_t)+(sizeof(classinfo_t*)*(num_interfaces+1)));
+    c->interfaces[0] = 0;
     c->access = access;
     c->package = package;
     c->name = name;
index 7450468..062e5dd 100644 (file)
@@ -61,7 +61,7 @@ extern type_t function_signature_type;
 
 void registry_init();
         
-classinfo_t* classinfo_register(int access, char*package, char*name);
+classinfo_t* classinfo_register(int access, char*package, char*name, int num_interfaces);
 memberinfo_t* memberinfo_register(classinfo_t*cls, const char*name, U8 type);
 
 // static multinames