summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-03-29 17:35:43 (GMT)
committerGitHub <noreply@github.com>2024-03-29 17:35:43 (GMT)
commit19c1dd60c5b53fb0533610ad139ef591294f26e8 (patch)
treef76436f1512efe26885b65c49585a761a1658e82 /Python/ceval.c
parent397d88db5e9ab2a43de3fdf5f8b973a949edc405 (diff)
downloadcpython-19c1dd60c5b53fb0533610ad139ef591294f26e8.zip
cpython-19c1dd60c5b53fb0533610ad139ef591294f26e8.tar.gz
cpython-19c1dd60c5b53fb0533610ad139ef591294f26e8.tar.bz2
gh-117323: Make `cell` thread-safe in free-threaded builds (#117330)
Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index d34db61..1b13eb1 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5,6 +5,7 @@
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_call.h" // _PyObject_CallNoArgs()
+#include "pycore_cell.h" // PyCell_GetRef()
#include "pycore_ceval.h"
#include "pycore_code.h"
#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS