summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-29 17:12:43 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-29 17:12:43 (GMT)
commitbeef8aa719e0573086571cb021225a544d2ae399 (patch)
treea6b41753a4d881c24c3e4fe199791f147c1984d9
parenteaedc7ce3296becb466fd42fa07319e9c43771a0 (diff)
downloadcpython-beef8aa719e0573086571cb021225a544d2ae399.zip
cpython-beef8aa719e0573086571cb021225a544d2ae399.tar.gz
cpython-beef8aa719e0573086571cb021225a544d2ae399.tar.bz2
Cprrect stuoid tyops -- was comparing variabes with themselves because
of co/cp mixup.
-rw-r--r--Python/compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 3962b63..7fbd2e9 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);