diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-09-23 02:39:37 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-09-23 02:39:37 +0000 |
commit | f4aca755bc9f26b51b6820a162a3f76c2a1a1abc (patch) | |
tree | 396d803b3cf3ffbee73269c6ebb92e25f30ee373 /Objects/classobject.c | |
parent | 7790c3b802e98f706f0caf729cdd8a5bad5a3ce7 (diff) | |
download | cpython-git-f4aca755bc9f26b51b6820a162a3f76c2a1a1abc.tar.gz |
A static swapped_op[] array was defined in 3 different C files, & I think
I need to define it again. Bite the bullet and define it once as an
extern, _Py_SwappedOp[].
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index bdbcd6a1b3..506faab467 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -1873,9 +1873,6 @@ half_richcompare(PyObject *v, PyObject *w, int op) return res; } -/* Map rich comparison operators to their swapped version, e.g. LT --> GT */ -static int swapped_op[] = {Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE}; - static PyObject * instance_richcompare(PyObject *v, PyObject *w, int op) { @@ -1889,7 +1886,7 @@ instance_richcompare(PyObject *v, PyObject *w, int op) } if (PyInstance_Check(w)) { - res = half_richcompare(w, v, swapped_op[op]); + res = half_richcompare(w, v, _Py_SwappedOp[op]); if (res != Py_NotImplemented) return res; Py_DECREF(res); |