Commit e9df7271 authored by Guido van Rossum's avatar Guido van Rossum

change comparing instance methods

parent f1bb3349
...@@ -1209,10 +1209,9 @@ static int ...@@ -1209,10 +1209,9 @@ static int
instancemethod_compare(a, b) instancemethod_compare(a, b)
instancemethodobject *a, *b; instancemethodobject *a, *b;
{ {
int cmp = cmpobject(a->im_self, b->im_self); if (a->im_self != b->im_self)
if (cmp == 0) return (a->im_self < b->im_self) ? -1 : 1;
cmp = cmpobject(a->im_func, b->im_func); return cmpobject(a->im_func, b->im_func);
return cmp;
} }
static object * static object *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment