Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit f6dfdea

Browse files
author
Anselm Kruis
committed
Stackless issue #203: use the macro _PyStackless_TRY_STACKLESS
instead of _PyRuntime.st.try_stackless.
1 parent e093c8d commit f6dfdea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ type_call(PyTypeObject *type, PyObject *args, PyObject *kwds)
957957
int is_stackless;
958958
if (tp_init == slot_tp_init)
959959
STACKLESS_PROMOTE_ALL();
960-
is_stackless = (_PyRuntime.st.try_stackless);
960+
is_stackless = _PyStackless_TRY_STACKLESS;
961961
#endif
962962
res = tp_init(obj, args, kwds);
963963
#ifdef STACKLESS

Stackless/module/stacklessmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ test_nostacklesscall_call(PyObject *f, PyObject *arg, PyObject *kw)
10381038
PyObject * callback1;
10391039
PyObject * callback2 = NULL;
10401040
PyObject * rest;
1041-
int stackless = (_PyRuntime.st.try_stackless);
1041+
int stackless = _PyStackless_TRY_STACKLESS;
10421042

10431043
callback1 = PyTuple_GetItem(arg, 0);
10441044
if (callback1 == NULL)
@@ -1062,7 +1062,7 @@ test_nostacklesscall_call(PyObject *f, PyObject *arg, PyObject *kw)
10621062
l = PyObject_IsTrue(setTryStackless);
10631063
Py_DECREF(setTryStackless);
10641064
if (-1 != l)
1065-
(_PyRuntime.st.try_stackless) = l;
1065+
_PyStackless_TRY_STACKLESS = l;
10661066
else
10671067
return NULL;
10681068
}
@@ -1092,14 +1092,14 @@ test_nostacklesscall_call(PyObject *f, PyObject *arg, PyObject *kw)
10921092
return NULL;
10931093
}
10941094

1095-
rest = Py_BuildValue("Oii", result, stackless, (_PyRuntime.st.try_stackless));
1095+
rest = Py_BuildValue("Oii", result, stackless, _PyStackless_TRY_STACKLESS);
10961096
Py_DECREF(result);
10971097
if (rest == NULL) {
10981098
Py_DECREF(callback2);
10991099
return NULL;
11001100
}
11011101

1102-
(_PyRuntime.st.try_stackless) = 0;
1102+
_PyStackless_TRY_STACKLESS = 0;
11031103
result = PyObject_Call(callback2, rest, kw);
11041104
Py_DECREF(callback2);
11051105
Py_DECREF(rest);

0 commit comments

Comments
 (0)