Skip to content

The signature of _PyLong_AsByteArray has changed in CPython 3.13 #563

@ryanking13

Description

@ryanking13

The signature of _PyLong_AsByteArray has changed in CPython 3.13 (python/cpython#114886). It accepts an additional with_exceptions parameter.

The orjson is using an old signature:

#[cfg_attr(PyPy, link_name = "_PyPyLong_AsByteArrayO")]
pub fn _PyLong_AsByteArray(
v: *mut PyLongObject,
bytes: *mut c_uchar,
n: size_t,
little_endian: c_int,
is_signed: c_int,
) -> c_int;

This signature might not be an issue in the native environment, but in WASM (which is more strict to the function signature), this causes an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions