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/2003-December/041146.html below:

[Python-Dev] Py_DECREF causes spurious gcc warning

[Python-Dev] Py_DECREF causes spurious gcc warning [Python-Dev] Py_DECREF causes spurious gcc warningSkip Montanaro skip at pobox.com
Wed Dec 17 19:34:55 EST 2003
    Tim> [Skip Montanaro]
    >> Then you also agree we should bracify the Py_*REF macros, right?
    >> <wink>

    Tim> That can't work, alas -- the macro has no idea whether curly braces
    Tim> are syntactically legal in the context it's invoked in.  

I meant the Py_*REF macros which expand to "if" statements and you'd bracify
the clauses, e.g., Py_DECREF would become:

#define Py_DECREF(op)                                   \
        if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA       \
            --(op)->ob_refcnt != 0) {                   \
                _Py_CHECK_REFCNT(op)                    \
        } else {                                        \
                _Py_Dealloc((PyObject *)(op))           \
        }

Py_INCREF would be left alone, and the X variants would become

#define Py_XINCREF(op) if ((op) == NULL) {;} else { Py_INCREF(op) }
#define Py_XDECREF(op) if ((op) == NULL) {;} else {Py_DECREF(op) }

Skip

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