08.11.17 18:37, Victor Stinner пише: > I like these macros! > > Technically, would it be possible to use an inline function instead of > a macro for Python 3.7? No, unless there is a way to pass arguments by reference in C99. Py_SETREF(x, y) is the safe equivalent of x = y; Py_DECREF(x, y);