mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Get the type of Method right.
It's a direct structure rather than a pointer.
This commit is contained in:
parent
ba27db6b93
commit
6ebee4ad0e
4 changed files with 9 additions and 10 deletions
|
@ -46,8 +46,8 @@ typedef enum {
|
|||
//@extern SEL sel_register_typed_name (string name, string type);
|
||||
@extern BOOL sel_is_mapped (SEL aSel);
|
||||
|
||||
@extern Method class_get_class_method (Class class, SEL aSel);
|
||||
@extern Method class_get_instance_method (Class class, SEL aSel);
|
||||
@extern Method []class_get_class_method (Class class, SEL aSel);
|
||||
@extern Method []class_get_instance_method (Class class, SEL aSel);
|
||||
@extern Class class_pose_as (Class imposter, Class superclass);
|
||||
@extern id class_create_instance (Class class);
|
||||
@extern string class_get_class_name (Class class);
|
||||
|
@ -61,7 +61,7 @@ typedef enum {
|
|||
@extern (void []) class_get_gc_object_type (Class class);
|
||||
@extern void class_ivar_set_gcinvisible (Class class, string ivarname, BOOL gcInvisible);
|
||||
|
||||
@extern IMP method_get_imp (Method method);
|
||||
@extern IMP method_get_imp (Method []method);
|
||||
@extern IMP get_imp (Class class, SEL sel);
|
||||
|
||||
@extern id object_copy (id object);
|
||||
|
|
|
@ -32,8 +32,8 @@ SEL (string name) sel_register_name = #0;
|
|||
//SEL (string name, string type) sel_register_typed_name = #0;
|
||||
BOOL (SEL aSel) sel_is_mapped = #0;
|
||||
|
||||
Method (Class class, SEL aSel) class_get_class_method = #0;
|
||||
Method (Class class, SEL aSel) class_get_instance_method = #0;
|
||||
Method [](Class class, SEL aSel) class_get_class_method = #0;
|
||||
Method [](Class class, SEL aSel) class_get_instance_method = #0;
|
||||
Class (Class imposter, Class superclass) class_pose_as = #0;
|
||||
id (Class class) class_create_instance = #0;
|
||||
string (Class class) class_get_class_name = #0;
|
||||
|
@ -47,7 +47,7 @@ void (Class class, integer version) class_set_version = #0;
|
|||
(void []) (Class class) class_get_gc_object_type = #0;
|
||||
void (Class class, string ivarname, BOOL gcInvisible) class_ivar_set_gcinvisible = #0;
|
||||
|
||||
IMP (Method method) method_get_imp = #0;
|
||||
IMP (Method []method) method_get_imp = #0;
|
||||
IMP (Class class, SEL sel) get_imp = #0;
|
||||
|
||||
id (id object) object_copy = #0;
|
||||
|
|
|
@ -409,7 +409,7 @@ emit_methods (methodlist_t *_methods, const char *name, int instance)
|
|||
new_struct_field (method_list, &type_pointer, "method_next", vis_public);
|
||||
new_struct_field (method_list, &type_integer, "method_count", vis_public);
|
||||
for (i = 0; i < count; i++)
|
||||
new_struct_field (method_list, type_Method.t.fldptr.type, 0,
|
||||
new_struct_field (method_list, &type_Method, 0,
|
||||
vis_public);
|
||||
methods_def = get_def (method_list->type,
|
||||
va ("_OBJ_%s_METHODS_%s", type, name),
|
||||
|
|
|
@ -83,7 +83,7 @@ type_t type_supermsg = { ev_func, ".supermsg", ty_none,
|
|||
{{&type_id, -3, {0, &type_SEL}}}};
|
||||
type_t type_obj_exec_class = { ev_func, "function", ty_none,
|
||||
{{&type_void, 1, { 0 }}}};
|
||||
type_t type_Method = { ev_pointer, "Method" };
|
||||
type_t type_Method = { ev_invalid, "Method" };
|
||||
type_t type_Super = { ev_invalid, "Super" };
|
||||
type_t type_method_description = { ev_invalid, "obj_method_description",
|
||||
ty_struct };
|
||||
|
@ -833,11 +833,10 @@ init_types (void)
|
|||
type_SEL.t.fldptr.type = strct->type;
|
||||
|
||||
strct = get_struct (0, 1);
|
||||
init_struct (strct, new_type (), str_struct, 0);
|
||||
init_struct (strct, &type_Method, str_struct, 0);
|
||||
new_struct_field (strct, &type_SEL, "method_name", vis_public);
|
||||
new_struct_field (strct, &type_string, "method_types", vis_public);
|
||||
new_struct_field (strct, &type_IMP, "method_imp", vis_public);
|
||||
type_Method.t.fldptr.type = strct->type;
|
||||
|
||||
strct = get_struct (0, 1);
|
||||
init_struct (strct, type = new_type (), str_struct, 0);
|
||||
|
|
Loading…
Reference in a new issue