From 39d126d17a48f14de9dcc6fc80a3a13f50ed87b3 Mon Sep 17 00:00:00 2001 From: alperyoney Date: Wed, 4 Feb 2026 09:41:47 -0800 Subject: [PATCH] Fix C++ compatibility in _PyCell_GetStackRef --- Include/internal/pycore_cell.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/pycore_cell.h b/Include/internal/pycore_cell.h index cef01e80514f4b..a9b61b0d53c672 100644 --- a/Include/internal/pycore_cell.h +++ b/Include/internal/pycore_cell.h @@ -53,7 +53,7 @@ _PyCell_GetStackRef(PyCellObject *cell) { PyObject *value; #ifdef Py_GIL_DISABLED - value = _Py_atomic_load_ptr(&cell->ob_ref); + value = (PyObject *)_Py_atomic_load_ptr(&cell->ob_ref); if (value == NULL) { return PyStackRef_NULL; }