We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a09df commit 4b75c14Copy full SHA for 4b75c14
1 file changed
Include/internal/pycore_cell.h
@@ -3,6 +3,7 @@
3
4
#include "pycore_critical_section.h"
5
#include "pycore_object.h"
6
+#include "pycore_stackref.h"
7
8
#ifdef __cplusplus
9
extern "C" {
@@ -38,7 +39,11 @@ PyCell_GetRef(PyCellObject *cell)
38
39
{
40
PyObject *res;
41
Py_BEGIN_CRITICAL_SECTION(cell);
42
+#ifdef Py_GIL_DISABLED
43
+ res = _Py_XNewRefWithLock(cell->ob_ref);
44
+#else
45
res = Py_XNewRef(cell->ob_ref);
46
+#endif
47
Py_END_CRITICAL_SECTION();
48
return res;
49
}
0 commit comments