On Mon, Aug 15, 2011 at 12:34 PM, Brett Cannon <brett at python.org> wrote: > On Thu, Aug 11, 2011 at 00:02, Antoine Pitrou <solipsis at pitrou.net> wrote: >> It would sound more useful to have a generic Py_RETURN() macro rather than >> some specific forms for each and every common object. > > Since the macro is rather generic, sure, but the name should probably be > better since it doesn't necessarily convene the fact that a INCREF has > occurred. So maybe Py_INCREF_RETURN()? Aside from None and NotImplemented, do we really do the straight incref-and-return all that often? While I was initially attracted to the idea of a generic macro, the more I thought about it, the more it seemed like a magnet for reference leak bugs. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4