File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN;
101101#if defined(Py_DEBUG ) || defined(Py_LIMITED_API )
102102#define _PyErr_OCCURRED () PyErr_Occurred()
103103#else
104- #define _PyErr_OCCURRED () (_PyThreadState_Current ->curexc_type)
104+ #define _PyErr_OCCURRED () (PyThreadState_GET() ->curexc_type)
105105#endif
106106
107107/* Error testing and normalization */
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ Projected release date: 2013-10-20
1010Core and Builtins
1111-----------------
1212
13+ - Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at
14+ least one place so as to avoid regressions.
15+
1316- Issue #19087: Improve bytearray allocation in order to allow cheap popping
1417 of data at the front (slice deletion).
1518
Original file line number Diff line number Diff line change @@ -2162,7 +2162,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
21622162 }
21632163 else {
21642164 v = PyObject_GetItem (locals , name );
2165- if (v == NULL && PyErr_Occurred ()) {
2165+ if (v == NULL && _PyErr_OCCURRED ()) {
21662166 if (!PyErr_ExceptionMatches (PyExc_KeyError ))
21672167 goto error ;
21682168 PyErr_Clear ();
@@ -2207,7 +2207,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
22072207 (PyDictObject * )f -> f_builtins ,
22082208 name );
22092209 if (v == NULL ) {
2210- if (!PyErr_Occurred ())
2210+ if (!_PyErr_OCCURRED ())
22112211 format_exc_check_arg (PyExc_NameError ,
22122212 NAME_ERROR_MSG , name );
22132213 goto error ;
You can’t perform that action at this time.
0 commit comments