On Wed, 26 Feb 2014 11:40:01 +0200 Serhiy Storchaka <storch...@gmail.com> wrote:
> There were several suggestions for naming new macros which replace old > value with new value and then (x)decref old value. > > #define Py_XXX(ptr, value) \ > { \ > PyObject *__tmp__ = ptr; \ > ptr = new_value; \ > Py_DECREF(__tmp__); \ > } > 1. Py_(X)SETREF. My vote is on this one. I'm also -1 on any name which doesn't have "REF" in it; the name should clearly suggest that it's a refcounting operation. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com