]> granicus.if.org Git - python/commitdiff
Fix leak introduced by previous typeobject.c checkin.
authorGuido van Rossum <guido@python.org>
Thu, 9 Oct 2003 03:46:35 +0000 (03:46 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 9 Oct 2003 03:46:35 +0000 (03:46 +0000)
Objects/typeobject.c

index 2708cdce867c482f03b580384aa1d230ec04ca39..cc844ad6ddb1e2467627634ea79627ec4159b134 100644 (file)
@@ -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 *