check whether the method is an instance or class method when comparing

This commit is contained in:
Bill Currie 2002-05-16 20:48:41 +00:00
parent 779174cb33
commit eba5e68726
2 changed files with 7 additions and 7 deletions

View file

@ -183,7 +183,9 @@ class_find_method (class_t *class, method_t *method)
return m; return m;
sel = dstring_newstr (); sel = dstring_newstr ();
selector_name (sel, (keywordarg_t *)method->selector); selector_name (sel, (keywordarg_t *)method->selector);
warning (0, "method %s not in %s%s", sel->str, class->class_name, warning (0, "%s method %s not in %s%s",
method->instance ? "instance" : "class",
sel->str, class->class_name,
class->category_name ? va (" (%s)", class->category_name) : ""); class->category_name ? va (" (%s)", class->category_name) : "");
dstring_delete (sel); dstring_delete (sel);
return method; return method;

View file

@ -138,12 +138,10 @@ copy_methods (methodlist_t *dst, methodlist_t *src)
int int
method_compare (method_t *m1, method_t *m2) method_compare (method_t *m1, method_t *m2)
{ {
int res; if (m1->instance != m2->instance)
return 0;
res = strcmp (m1->name, m2->name) == 0 return strcmp (m1->name, m2->name) == 0
&& strcmp (m1->types, m2->types) == 0; && strcmp (m1->types, m2->types) == 0;
return res;
} }
keywordarg_t * keywordarg_t *