382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
}
}
/* FIXME: We need a way to free this at objc_exit() */
if ((ml = malloc(sizeof(struct objc_method_list))) == NULL)
ERROR("Not enough memory to replace method!");
ml->next = cls->isa->methodlist;
ml->count = 1;
ml->methods[0].sel.uid = sel->uid;
ml->methods[0].sel.types = types;
ml->methods[0].imp = newimp;
cls->isa->methodlist = ml;
objc_update_dtable(cls);
objc_global_mutex_unlock();
return (IMP)nil;
}
|
|
|
|
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
}
}
/* FIXME: We need a way to free this at objc_exit() */
if ((ml = malloc(sizeof(struct objc_method_list))) == NULL)
ERROR("Not enough memory to replace method!");
ml->next = cls->methodlist;
ml->count = 1;
ml->methods[0].sel.uid = sel->uid;
ml->methods[0].sel.types = types;
ml->methods[0].imp = newimp;
cls->methodlist = ml;
objc_update_dtable(cls);
objc_global_mutex_unlock();
return (IMP)nil;
}
|