On Mon, Aug 15, 2011 at 12:34 PM, Brett Cannon <[email protected]> wrote: > On Thu, Aug 11, 2011 at 00:02, Antoine Pitrou <[email protected]> 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 | [email protected] | Brisbane, Australia _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
