[Python-Dev] RE: [Python-checkins]
python/dist/src/Objectstypeobject.c, 2.244, 2.245
gminick at hacker.pl
Thu Oct 9 15:42:30 EDT 2003
On Thu, Oct 09, 2003 at 11:16:42AM -0400, Raymond Hettinger wrote:
> One issue with the way you wrote it is that both PyInt_FromLong() and
> Py_ObjectIsTrue() create new Python objects but only one of them is
> returned. The other needs to have its reference count lowered by one so
> that obj.__contains__() won't leak.
While everything else was clear before, the text above is a nice reminder,
some kind of warning, how to code better. Thank you.
[ Wojtek Walczak - gminick (at) underground.org.pl ]
[ <http://gminick.linuxsecurity.pl/> ]
[ "...rozmaite zwroty, matowe od patyny dawnosci." ]
More information about the Python-Dev