Jesús Cea Avión added the comment: 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. ---------- assignee: -> jcea _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2159> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com