Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit beef8aa

Browse files
committed
Cprrect stuoid tyops -- was comparing variabes with themselves because
of co/cp mixup.
1 parent eaedc7c commit beef8aa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Python/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ code_compare(co, cp)
141141
PyCodeObject *co, *cp;
142142
{
143143
int cmp;
144-
cmp = cp->co_argcount - cp->co_argcount;
144+
cmp = co->co_argcount - cp->co_argcount;
145145
if (cmp) return cmp;
146-
cmp = cp->co_nlocals - cp->co_nlocals;
146+
cmp = co->co_nlocals - cp->co_nlocals;
147147
if (cmp) return cmp;
148-
cmp = cp->co_flags - cp->co_flags;
148+
cmp = co->co_flags - cp->co_flags;
149149
if (cmp) return cmp;
150150
cmp = PyObject_Compare((PyObject *)co->co_code,
151151
(PyObject *)cp->co_code);

0 commit comments

Comments
 (0)