[Python-Dev] RE: [Python-checkins] python/dist/src/Objects typeobject.c, 2.244, 2.245
Raymond Hettinger
python at rcn.com
Wed Oct 8 22:53:06 EDT 2003
More information about the Python-Dev mailing list
Wed Oct 8 22:53:06 EDT 2003
- Previous message: [Python-Dev] obj.__contains__() returns 1/0...
- Next message: [Python-Dev] RE: [Python-checkins] python/dist/src/Objects typeobject.c, 2.244, 2.245
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
if (res == -1 && PyErr_Occurred())
return NULL;
! return PyInt_FromLong((long)res);
}
--- 3577,3583 ----
if (res == -1 && PyErr_Occurred())
return NULL;
! ret = PyObject_IsTrue(PyInt_FromLong((long)res)) ? Py_True :
Py_False;
The line above leaks and does unnecessary work. I believe it should
read:
ret = res ? Py_True : Py_False;
Also, there is another one of these in Objects/descrobject.c line 712.
Raymond Hettinger
- Previous message: [Python-Dev] obj.__contains__() returns 1/0...
- Next message: [Python-Dev] RE: [Python-checkins] python/dist/src/Objects typeobject.c, 2.244, 2.245
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list