summaryrefslogtreecommitdiff
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 7cb72ceab4..da04af43a4 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -6,7 +6,7 @@
#include "structmember.h"
#include "pycore_code.h"
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
-#include "pycore_pystate.h" // _PyInterpreterState_GET_UNSAFE()
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_tupleobject.h"
#include "clinic/codeobject.c.h"
@@ -555,7 +555,7 @@ code_dealloc(PyCodeObject *co)
co->co_opcache_size = 0;
if (co->co_extra != NULL) {
- PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
+ PyInterpreterState *interp = _PyInterpreterState_GET();
_PyCodeObjectExtra *co_extra = co->co_extra;
for (Py_ssize_t i = 0; i < co_extra->ce_size; i++) {
@@ -1074,7 +1074,7 @@ _PyCode_GetExtra(PyObject *code, Py_ssize_t index, void **extra)
int
_PyCode_SetExtra(PyObject *code, Py_ssize_t index, void *extra)
{
- PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
+ PyInterpreterState *interp = _PyInterpreterState_GET();
if (!PyCode_Check(code) || index < 0 ||
index >= interp->co_extra_user_count) {