-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b982fee
commit b10d55a
Showing
9 changed files
with
256 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Support Python 3.13. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
use crate::longobject::*; | ||
use crate::object::*; | ||
#[cfg(Py_3_13)] | ||
use crate::pyport::Py_ssize_t; | ||
use libc::size_t; | ||
#[cfg(Py_3_13)] | ||
use std::os::raw::c_void; | ||
use std::os::raw::{c_int, c_uchar}; | ||
|
||
#[cfg(Py_3_13)] | ||
extern "C" { | ||
pub fn PyLong_FromUnicodeObject(u: *mut PyObject, base: c_int) -> *mut PyObject; | ||
} | ||
|
||
#[cfg(Py_3_13)] | ||
pub const Py_ASNATIVEBYTES_DEFAULTS: c_int = -1; | ||
#[cfg(Py_3_13)] | ||
pub const Py_ASNATIVEBYTES_BIG_ENDIAN: c_int = 0; | ||
#[cfg(Py_3_13)] | ||
pub const Py_ASNATIVEBYTES_LITTLE_ENDIAN: c_int = 1; | ||
#[cfg(Py_3_13)] | ||
pub const Py_ASNATIVEBYTES_NATIVE_ENDIAN: c_int = 3; | ||
#[cfg(Py_3_13)] | ||
pub const Py_ASNATIVEBYTES_UNSIGNED_BUFFER: c_int = 4; | ||
#[cfg(Py_3_13)] | ||
pub const Py_ASNATIVEBYTES_REJECT_NEGATIVE: c_int = 8; | ||
|
||
extern "C" { | ||
// skipped _PyLong_Sign | ||
|
||
#[cfg(Py_3_13)] | ||
pub fn PyLong_AsNativeBytes( | ||
v: *mut PyObject, | ||
buffer: *mut c_void, | ||
n_bytes: Py_ssize_t, | ||
flags: c_int, | ||
) -> Py_ssize_t; | ||
|
||
#[cfg(Py_3_13)] | ||
pub fn PyLong_FromNativeBytes( | ||
buffer: *const c_void, | ||
n_bytes: size_t, | ||
flags: c_int, | ||
) -> *mut PyObject; | ||
|
||
#[cfg(Py_3_13)] | ||
pub fn PyLong_FromUnsignedNativeBytes( | ||
buffer: *const c_void, | ||
n_bytes: size_t, | ||
flags: c_int, | ||
) -> *mut PyObject; | ||
|
||
// skipped PyUnstable_Long_IsCompact | ||
// skipped PyUnstable_Long_CompactValue | ||
|
||
#[cfg_attr(PyPy, link_name = "_PyPyLong_FromByteArray")] | ||
pub fn _PyLong_FromByteArray( | ||
bytes: *const c_uchar, | ||
n: size_t, | ||
little_endian: c_int, | ||
is_signed: c_int, | ||
) -> *mut PyObject; | ||
|
||
#[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; | ||
|
||
// skipped _PyLong_GCD | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.