ObjFW  Check-in [db2fccd01f]

Overview
Comment:Fix class_replaceMethod().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | runtime
Files: files | file ages | folders
SHA3-256: db2fccd01f51250632b9295928db320295bb41773edc3273a1eef59429e9f699
User & Date: js on 2012-03-23 11:08:17
Other Links: branch diff | manifest | tags
Context
2012-03-23
12:04
Merge branch 'master' into runtime check-in: 3719e10281 user: js tags: runtime
11:08
Fix class_replaceMethod(). check-in: db2fccd01f user: js tags: runtime
10:46
Fix objc_get_type_encoding(). check-in: 4cf75724eb user: js tags: runtime
Changes

Modified src/runtime/class.m from [53297dd85d] to [c6f580ab0e].

382
383
384
385
386
387
388
389

390
391
392
393
394
395

396
397
398
399
400
401
402
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->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->isa->methodlist = ml;
	cls->methodlist = ml;

	objc_update_dtable(cls);

	objc_global_mutex_unlock();

	return (IMP)nil;
}