This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jcea
Recipients eolson, jafo, jcea, johansen, ysj.ray
Date 2014-05-01.10:49:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398941346.75.0.351375588187.issue2159@psf.upfronthosting.co.za>
In-reply-to
Content
OK, you did your homework.

I checked "PyObject_Is_True()" function and I agree. This actually looks like a "leak" when True/False were added to Python. Python3 is inheriting it :-).

OK.

I see three issues in the code:

a) You are getting a key from the database, and you are not freeing it. So, this code leaks memory.

b) You should check database errors too. Documentation says "When the end of the database is reached, the dptr member of the key is a null pointer. If an error is detected, the dptr member of the key shall be a null pointer and the error condition of the database shall be set.". Raise an exception with the proper error. Would be nice to test that too, but it is probably nos possible.

c) Please, use NULL instead of "0".

Thanks for your effort, Eric.
History
Date User Action Args
2014-05-01 10:49:06jceasetrecipients: + jcea, jafo, johansen, ysj.ray, eolson
2014-05-01 10:49:06jceasetmessageid: <1398941346.75.0.351375588187.issue2159@psf.upfronthosting.co.za>
2014-05-01 10:49:06jcealinkissue2159 messages
2014-05-01 10:49:05jceacreate