diff --git a/pythoncapi_compat.h b/pythoncapi_compat.h index 0ea8e80..c533b82 100644 --- a/pythoncapi_compat.h +++ b/pythoncapi_compat.h @@ -583,7 +583,7 @@ static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj) return 0; } *pobj = Py_NewRef(obj); - return (*pobj != NULL); + return 1; } #endif