diff options
author | Victor Stinner <vstinner@python.org> | 2021-02-19 12:21:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-19 12:21:51 (GMT) |
commit | 62078101ea1be5d2fc472a3f0d9d135e0bd5cd38 (patch) | |
tree | 59fe5f8978ae72a51143d88ec8389abb72d7439a /Include/cpython | |
parent | 5592f2b9daa24bf74cc616abcc40a29da2bdccb2 (diff) | |
download | cpython-62078101ea1be5d2fc472a3f0d9d135e0bd5cd38.zip cpython-62078101ea1be5d2fc472a3f0d9d135e0bd5cd38.tar.gz cpython-62078101ea1be5d2fc472a3f0d9d135e0bd5cd38.tar.bz2 |
bpo-40522: Replace PyThreadState_GET() with PyThreadState_Get() (GH-24575)
Use directly the PyThreadState_Get() function in public header files,
since PyThreadState_GET() macro is just an alias to it in pratice in
these files.
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/abstract.h | 8 | ||||
-rw-r--r-- | Include/cpython/object.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index db5055d..db85021 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -119,7 +119,7 @@ static inline PyObject * PyObject_Vectorcall(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = PyThreadState_Get(); return _PyObject_VectorcallTstate(tstate, callable, args, nargsf, kwnames); } @@ -155,7 +155,7 @@ _PyObject_FastCallTstate(PyThreadState *tstate, PyObject *func, PyObject *const static inline PyObject * _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = PyThreadState_Get(); return _PyObject_FastCallTstate(tstate, func, args, nargs); } @@ -164,7 +164,7 @@ _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs) PyObject_CallNoArgs(). */ static inline PyObject * _PyObject_CallNoArg(PyObject *func) { - PyThreadState *tstate = PyThreadState_GET(); + PyThreadState *tstate = PyThreadState_Get(); return _PyObject_VectorcallTstate(tstate, func, NULL, 0, NULL); } @@ -179,7 +179,7 @@ PyObject_CallOneArg(PyObject *func, PyObject *arg) assert(arg != NULL); args = _args + 1; // For PY_VECTORCALL_ARGUMENTS_OFFSET args[0] = arg; - tstate = PyThreadState_GET(); + tstate = PyThreadState_Get(); nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET; return _PyObject_VectorcallTstate(tstate, func, args, nargsf, NULL); } diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 86889f8..58e4d2b 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -528,7 +528,7 @@ PyAPI_FUNC(int) _PyTrash_cond(PyObject *op, destructor dealloc); /* If "cond" is false, then _tstate remains NULL and the deallocator \ * is run normally without involving the trashcan */ \ if (cond) { \ - _tstate = PyThreadState_GET(); \ + _tstate = PyThreadState_Get(); \ if (_PyTrash_begin(_tstate, _PyObject_CAST(op))) { \ break; \ } \ |