Amaury Forgeot d'Arc added the comment:

- For the replacement with NULL, Py_CLEAR() should be used instead.

- We should use a macro (Py_REF_ASSIGN?) for the replacement case.

- Careful, in Modules/_json.c the code is wrong because tmp is already used::

        PyObject *tmp = PyUnicode_AsEncodedString(...);
            PyObject *tmp = s->encoding;
            s->encoding = tmp;


Python tracker <>
Python-bugs-list mailing list

Reply via email to