diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-14 13:14:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 13:14:01 (GMT) |
commit | 81a7be3fa22c983209cc0ffb3537b92b0370f83c (patch) | |
tree | c257d7143ecc60574353caa76fa2992a455ebb54 /Python/dynload_shlib.c | |
parent | 4a3fe0835310643193ea45529ab0fb45c5f8f2fd (diff) | |
download | cpython-81a7be3fa22c983209cc0ffb3537b92b0370f83c.zip cpython-81a7be3fa22c983209cc0ffb3537b92b0370f83c.tar.gz cpython-81a7be3fa22c983209cc0ffb3537b92b0370f83c.tar.bz2 |
bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)
Rename _PyInterpreterState_GET_UNSAFE() to _PyInterpreterState_GET()
for consistency with _PyThreadState_GET() and to have a shorter name
(help to fit into 80 columns).
Add also "assert(tstate != NULL);" to the function.
Diffstat (limited to 'Python/dynload_shlib.c')
-rw-r--r-- | Python/dynload_shlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 223e0d0..082154d 100644 --- a/Python/dynload_shlib.c +++ b/Python/dynload_shlib.c @@ -3,7 +3,7 @@ #include "Python.h" #include "pycore_interp.h" // _PyInterpreterState.dlopenflags -#include "pycore_pystate.h" // _PyInterpreterState_GET_UNSAFE() +#include "pycore_pystate.h" // _PyInterpreterState_GET() #include "importdl.h" #include <sys/types.h> @@ -95,7 +95,7 @@ _PyImport_FindSharedFuncptr(const char *prefix, } } - dlopenflags = _PyInterpreterState_GET_UNSAFE()->dlopenflags; + dlopenflags = _PyInterpreterState_GET()->dlopenflags; handle = dlopen(pathname, dlopenflags); |