ObjFW  Check-in [28f58d5a6e]

Overview
Comment:Fix objc_get_type_encoding().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 28f58d5a6ece76c08f7b20f6cf893a57c7030b911e0a3c48caa89807ed064df9
User & Date: js on 2012-11-14 08:00:09
Other Links: manifest | tags
Context
2012-11-14
15:39
Initial -[forwarindTargetForSelector:]. check-in: d3a2e59414 user: js tags: trunk
08:00
Fix objc_get_type_encoding(). check-in: 28f58d5a6e user: js tags: trunk
2012-11-12
11:55
Add +[attributeWithName:stringValue:]. check-in: fd4f24cc22 user: js tags: trunk
Changes

Modified src/runtime/class.m from [cde4d41e21] to [d1989ac845].

431
432
433
434
435
436
437
438

439
440
441
442
443
444
445
431
432
433
434
435
436
437

438
439
440
441
442
443
444
445







-
+







	struct objc_category **cats;
	unsigned int i;

	objc_global_mutex_lock();

	for (ml = cls->methodlist; ml != NULL; ml = ml->next) {
		for (i = 0; i < ml->count; i++) {
			if (ml->methods[i].sel.uid == sel->uid) {
			if (sel_isEqual((SEL)&ml->methods[i].sel, sel)) {
				const char *ret = ml->methods[i].sel.types;
				objc_global_mutex_unlock();
				return ret;
			}
		}
	}

458
459
460
461
462
463
464



465
466
467
468
469
470
471
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474







+
+
+







				}
			}
		}
	}

	objc_global_mutex_unlock();

	if (cls->superclass != NULL)
		return objc_get_type_encoding(cls->superclass, sel);

	return NULL;
}

IMP
class_replaceMethod(Class cls, SEL sel, IMP newimp, const char *types)
{
	struct objc_method_list *ml;