From 52c18abc5ec0f1723598129bde5491cbbb0755a2 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Wed, 18 Nov 2009 21:56:10 -0800 Subject: [PATCH] Fix for class_addMethod with a root class. Reviewed by me. --- Objective-J/Runtime/runtime.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Objective-J/Runtime/runtime.js b/Objective-J/Runtime/runtime.js index 365ab725a..5266e0fec 100644 --- a/Objective-J/Runtime/runtime.js +++ b/Objective-J/Runtime/runtime.js @@ -161,12 +161,12 @@ function class_copyIvarList(/*Class*/ aClass) #define METHOD_DISPLAY_NAME(aClass, aMethod) (ISMETA(aClass) ? '+' : '-') + " [" + class_getName(aClass) + ' ' + method_getName(aMethod) + ']' -function class_addMethod(/*Class*/ aClass, /*SEL*/ aName, /*IMP*/ anImplementation, /*String*/aType) +function class_addMethod(/*Class*/ aClass, /*SEL*/ aName, /*IMP*/ anImplementation, /*Array*/ types) { if (aClass.method_hash[aName]) return NO; - var method = new objj_method(aName, anImplementation, aType); + var method = new objj_method(aName, anImplementation, types); aClass.method_list.push(method); aClass.method_dtable[aName] = method; @@ -177,7 +177,7 @@ function class_addMethod(/*Class*/ aClass, /*SEL*/ aName, /*IMP*/ anImplementati // FIXME: Should this be done here? // If this is a root class... if (!ISMETA(aClass) && GETMETA(aClass).isa === GETMETA(aClass)) - class_addMethod(GETMETA(aClass), method); + class_addMethod(GETMETA(aClass), aName, anImplementation, types); return YES; }