Skip to content

Commit 83e500b

Browse files
committed
Add _PyLong_Sign
ormsgpack currently interprets PyLongObjects' ob_size field. CPython also added this one back since they got feedback that there is no efficient public API alternative, yet: python/cpython#112026
1 parent f2e4667 commit 83e500b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎pyo3-ffi/src/cpython/longobject.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ pub const Py_ASNATIVEBYTES_UNSIGNED_BUFFER: c_int = 4;
2626
pub const Py_ASNATIVEBYTES_REJECT_NEGATIVE: c_int = 8;
2727

2828
extern "C" {
29-
// skipped _PyLong_Sign
29+
#[cfg(not(PyPy))]
30+
pub fn _PyLong_Sign(
31+
v: *mut PyObject,
32+
) -> c_int;
3033

3134
#[cfg(Py_3_13)]
3235
pub fn PyLong_AsNativeBytes(

0 commit comments

Comments
 (0)