mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-135906: Use _PyObject_CAST in internal headers (GH-135892) (GH-136392)
gh-135906: Use `_PyObject_CAST` in internal headers (GH-135892)
Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build.
---------
(cherry picked from commit fe187fae8d)
Co-authored-by: Charlie Lin <tuug@gmx.us>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
5a7d266fcb
commit
c72699086f
3 changed files with 4 additions and 3 deletions
|
|
@ -765,7 +765,7 @@ _Py_TryIncrefCompareStackRef(PyObject **src, PyObject *op, _PyStackRef *out)
|
|||
static inline int
|
||||
_Py_TryXGetStackRef(PyObject **src, _PyStackRef *out)
|
||||
{
|
||||
PyObject *op = _Py_atomic_load_ptr_relaxed(src);
|
||||
PyObject *op = _PyObject_CAST(_Py_atomic_load_ptr_relaxed(src));
|
||||
if (op == NULL) {
|
||||
*out = PyStackRef_NULL;
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue