A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-February/132807.html below:

[Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc

[Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etc [Python-Dev] Poll: Py_REPLACE/Py_ASSIGN/etcAntoine Pitrou solipsis at pitrou.net
Wed Feb 26 19:26:42 CET 2014
On Wed, 26 Feb 2014 11:40:01 +0200
Serhiy Storchaka <storchaka at 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.


More information about the Python-Dev mailing list

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