Fixed typo in comment in runtime.c.

Fixed unsafe dtable access in message lookup.
main
theraven 16 years ago
parent d770ed9688
commit d4fe4f522e

@ -439,7 +439,7 @@ BOOL
class_respondsToSelector(Class cls, SEL sel)
{
/* Warning the __objc_responds_to() function expects an id argument and
* dereferences the initial ivar (the 'isa' pointer) to fidn the class.
* dereferences the initial ivar (the 'isa' pointer) to find the class.
*/
return __objc_responds_to((id)&cls, sel);
}

@ -47,7 +47,8 @@ Slot_t objc_msg_lookup_internal(id *receiver, SEL selector, id sender)
{
// Check again incase another thread updated the dtable while we
// weren't looking
result = sarray_get_safe((*receiver)->class_pointer->dtable,
result =
sarray_get_safe(dtable_for_class((*receiver)->class_pointer),
(sidx)selector->sel_id);
}
if (0 == result)

Loading…
Cancel
Save