From: Guido van Rossum Date: Fri, 29 Aug 1997 17:12:43 +0000 (+0000) Subject: Cprrect stuoid tyops -- was comparing variabes with themselves because X-Git-Tag: v1.5a4~286 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=beef8aa719e0573086571cb021225a544d2ae399;p=thirdparty%2FPython%2Fcpython.git Cprrect stuoid tyops -- was comparing variabes with themselves because of co/cp mixup. --- diff --git a/Python/compile.c b/Python/compile.c index 3962b635f6e9..7fbd2e982741 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -141,11 +141,11 @@ code_compare(co, cp) PyCodeObject *co, *cp; { int cmp; - cmp = cp->co_argcount - cp->co_argcount; + cmp = co->co_argcount - cp->co_argcount; if (cmp) return cmp; - cmp = cp->co_nlocals - cp->co_nlocals; + cmp = co->co_nlocals - cp->co_nlocals; if (cmp) return cmp; - cmp = cp->co_flags - cp->co_flags; + cmp = co->co_flags - cp->co_flags; if (cmp) return cmp; cmp = PyObject_Compare((PyObject *)co->co_code, (PyObject *)cp->co_code);