<p dir="ltr"><br>
On 27 Feb 2014 04:28, "Antoine Pitrou" <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>
><br>
> On Wed, 26 Feb 2014 11:40:01 +0200<br>
> Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:<br>
><br>
> > There were several suggestions for naming new macros which replace old<br>
> > value with new value and then (x)decref old value.<br>
> ><br>
> > #define Py_XXX(ptr, value)        \<br>
> >      {                             \<br>
> >          PyObject *__tmp__ = ptr;  \<br>
> >          ptr = new_value;          \<br>
> >          Py_DECREF(__tmp__);       \<br>
> >      }<br>
><br>
><br>
> > 1. Py_(X)SETREF.<br>
><br>
> My vote is on this one.<br>
> I'm also -1 on any name which doesn't have "REF" in it; the name should<br>
> clearly suggest that it's a refcounting operation.</p>
<p dir="ltr">Yeah, I think SETREF is my favourite as well (even though some of the later suggestions were mine).</p>
<p dir="ltr">Cheers,<br>
Nick.</p>
<p dir="ltr">><br>
> Regards<br>
><br>
> Antoine.<br>
><br>
><br>
> _______________________________________________<br>
> Python-Dev mailing list<br>
> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a><br>
> Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com">https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com</a><br>
</p>