diff options
author | Guido van Rossum <guido@python.org> | 2003-10-09 03:46:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-10-09 03:46:35 (GMT) |
commit | 22c3dda1e64f413d4f6781d983067d580567071b (patch) | |
tree | 1bf3a58880f3706d0393354d29965b9d936ac645 | |
parent | 02c58f865c82021d1cde7064552d3a95301c8cc0 (diff) | |
download | cpython-22c3dda1e64f413d4f6781d983067d580567071b.zip cpython-22c3dda1e64f413d4f6781d983067d580567071b.tar.gz cpython-22c3dda1e64f413d4f6781d983067d580567071b.tar.bz2 |
Fix leak introduced by previous typeobject.c checkin.
-rw-r--r-- | Objects/typeobject.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 2708cdc..cc844ad 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3569,16 +3569,15 @@ wrap_objobjproc(PyObject *self, PyObject *args, void *wrapped) { objobjproc func = (objobjproc)wrapped; int res; - PyObject *value, *ret; + PyObject *value; if (!PyArg_ParseTuple(args, "O", &value)) return NULL; res = (*func)(self, value); if (res == -1 && PyErr_Occurred()) return NULL; - ret = PyObject_IsTrue(PyInt_FromLong((long)res)) ? Py_True : Py_False; - Py_INCREF(ret); - return ret; + else + return PyBool_FromLong(res); } static PyObject * |