Bugs item #1229429, was opened at 2005-06-29 03:18 Message generated for change (Settings changed) made by mwh You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1229429&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Gary (gdray-1) Assigned to: Michael Hudson (mwh) Summary: missing Py_DECREF in PyObject_CallMethod Initial Comment: Once PyObject *func has been successfully returned by PyObject_GetAttrString(), the ref count is not decremented by any of the error exit cases from PyObject_CallMethod(). After the check that func is not NULL, there are four error case exits that do not decrement the ref count on func. ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2005-07-12 11:31 Message: Logged In: YES user_id=80475 It's not an official, documented protocol. It is an implementation detail (choosen as a way to decouple individual types from the general purpose reversed() code). It is tested via the types than implement __reversed__ (such as collections.deque). BTW, all the general testing for reversed is cleverly hidden in test_enumerate. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-07-12 11:23 Message: Logged In: YES user_id=6656 Heh, it's a fair cop. Fixed in: Objects/abstract.c revision 2.137 Lib/test/test_enumerate.py revision 1.15 Misc/NEWS revision 1.1313 Raymond, while I have your attention, is the __reversed__ protocol tested anywhere? ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2005-07-12 04:08 Message: Logged In: YES user_id=80475 Assigning to the god of leak fixes. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1229429&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com