[Python-Dev] New poll about a macro for safe reference replacing
Serhiy Storchaka
storchaka at gmail.com
Wed Dec 16 09:12:47 EST 2015
More information about the Python-Dev mailing list
Wed Dec 16 09:12:47 EST 2015
- Previous message (by thread): [Python-Dev] async/await behavior on multiple calls
- Next message (by thread): [Python-Dev] New poll about a macro for safe reference replacing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm bringing this up again, since the results of the previous poll did
not give an unambiguous result. Related links: [1], [2], [3], [4].
Let me remind you that we are talking about adding the following macro.
It is needed for safe replacement links. For now there is at least one
open crash report that can be solved with this macro [5] (I think there
is yet one, but can't find it just now). And 50 potential bugs for which
we just still do not have a reproducer.
#define Py_XXX(ptr, value) \
{ \
PyObject *__tmp__ = ptr; \
ptr = new_value; \
Py_DECREF(__tmp__); \
}
The problem is only in the macro name. There are objections against any
proposed name, and no one name gained convincing majority.
Here are names gained the largest numbers of votes plus names proposed
during polling.
1. Py_SETREF
2. Py_DECREF_REPLACE
3. Py_REPLACE
4. Py_SET_POINTER
5. Py_SET_ATTR
6. Py_REPLACE_REF
Please put your vote (a floating number from -1 to 1 including) for
every of proposed name. You also can propose new name.
[1] https://mail.python.org/pipermail/python-dev/2008-May/079862.html
[2] http://comments.gmane.org/gmane.comp.python.devel/145346
[3] http://comments.gmane.org/gmane.comp.python.devel/145974
[4] http://bugs.python.org/issue20440
[5] http://bugs.python.org/issue24103
- Previous message (by thread): [Python-Dev] async/await behavior on multiple calls
- Next message (by thread): [Python-Dev] New poll about a macro for safe reference replacing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list