aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/internal/pycore_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_object.h')
-rw-r--r--Include/internal/pycore_object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index 8fe9875fae0..40f8ca68c00 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -614,7 +614,7 @@ static inline PyObject *
_Py_XGetRef(PyObject **ptr)
{
for (;;) {
- PyObject *value = _Py_atomic_load_ptr(ptr);
+ PyObject *value = _PyObject_CAST(_Py_atomic_load_ptr(ptr));
if (value == NULL) {
return value;
}
@@ -629,7 +629,7 @@ _Py_XGetRef(PyObject **ptr)
static inline PyObject *
_Py_TryXGetRef(PyObject **ptr)
{
- PyObject *value = _Py_atomic_load_ptr(ptr);
+ PyObject *value = _PyObject_CAST(_Py_atomic_load_ptr(ptr));
if (value == NULL) {
return value;
}