Skip to content

Commit

Permalink
use public Py_HashPointer API on 3.13+ (#52)
Browse files Browse the repository at this point in the history
* use public Py_HashPointer API on 3.13+

* Wrong direction in the conditional

---------

Co-authored-by: Armin Rigo <[email protected]>
  • Loading branch information
nitzmahone and arigo authored Feb 7, 2024
1 parent 954cab4 commit c27335f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/c/_cffi_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -2466,7 +2466,11 @@ static Py_hash_t cdata_hash(PyObject *v)
}
Py_DECREF(vv);
}
#if PY_VERSION_HEX < 0x030D0000
return _Py_HashPointer(((CDataObject *)v)->c_data);
#else
return Py_HashPointer(((CDataObject *)v)->c_data);
#endif
}

static Py_ssize_t
Expand Down

0 comments on commit c27335f

Please sign in to comment.