@@ -45,7 +45,66 @@ extern_libpython! {
4545 pub fn PyLong_AsUnsignedLong ( arg1: * mut PyObject ) -> c_ulong;
4646 #[ cfg_attr( PyPy , link_name = "PyPyLong_AsUnsignedLongMask" ) ]
4747 pub fn PyLong_AsUnsignedLongMask ( arg1: * mut PyObject ) -> c_ulong;
48- // skipped non-limited _PyLong_AsInt
48+
49+ // skipped non-limited PyLong_AsInt
50+
51+ #[ cfg( Py_3_14 ) ]
52+ pub fn PyLong_FromInt32 ( arg1: i32 ) -> * mut PyObject ;
53+ #[ cfg( Py_3_14 ) ]
54+ pub fn PyLong_FromUInt32 ( arg1: u32 ) -> * mut PyObject ;
55+ #[ cfg( Py_3_14 ) ]
56+ pub fn PyLong_FromInt64 ( arg1: i64 ) -> * mut PyObject ;
57+ #[ cfg( Py_3_14 ) ]
58+ pub fn PyLong_FromUInt64 ( arg1: u64 ) -> * mut PyObject ;
59+
60+ #[ cfg( Py_3_14 ) ]
61+ pub fn PyLong_AsInt32 ( arg1: * mut PyObject , arg2: * mut i32 ) -> c_int;
62+ #[ cfg( Py_3_14 ) ]
63+ pub fn PyLong_AsUInt32 ( arg1: * mut PyObject , arg2: * mut u32 ) -> c_int;
64+ #[ cfg( Py_3_14 ) ]
65+ pub fn PyLong_AsInt64 ( arg1: * mut PyObject , arg2: * mut i64 ) -> c_int;
66+ #[ cfg( Py_3_14 ) ]
67+ pub fn PyLong_AsUInt64 ( arg1: * mut PyObject , arg2: * mut u64 ) -> c_int;
68+ }
69+
70+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
71+ pub const Py_ASNATIVEBYTES_DEFAULTS : c_int = -1 ;
72+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
73+ pub const Py_ASNATIVEBYTES_BIG_ENDIAN : c_int = 0 ;
74+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
75+ pub const Py_ASNATIVEBYTES_LITTLE_ENDIAN : c_int = 1 ;
76+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
77+ pub const Py_ASNATIVEBYTES_NATIVE_ENDIAN : c_int = 3 ;
78+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
79+ pub const Py_ASNATIVEBYTES_UNSIGNED_BUFFER : c_int = 4 ;
80+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
81+ pub const Py_ASNATIVEBYTES_REJECT_NEGATIVE : c_int = 8 ;
82+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
83+ pub const Py_ASNATIVEBYTES_ALLOW_INDEX : c_int = 16 ;
84+
85+ extern_libpython ! {
86+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
87+ pub fn PyLong_AsNativeBytes (
88+ v: * mut PyObject ,
89+ buffer: * mut c_void,
90+ n_bytes: Py_ssize_t ,
91+ flags: c_int,
92+ ) -> Py_ssize_t ;
93+
94+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
95+ pub fn PyLong_FromNativeBytes (
96+ buffer: * const c_void,
97+ n_bytes: size_t,
98+ flags: c_int,
99+ ) -> * mut PyObject ;
100+
101+ #[ cfg( any( Py_3_14 , all( Py_3_13 , not( Py_LIMITED_API ) ) ) ) ]
102+ pub fn PyLong_FromUnsignedNativeBytes (
103+ buffer: * const c_void,
104+ n_bytes: size_t,
105+ flags: c_int,
106+ ) -> * mut PyObject ;
107+
49108 pub fn PyLong_GetInfo ( ) -> * mut PyObject ;
50109 // skipped PyLong_AS_LONG
51110
@@ -54,15 +113,6 @@ extern_libpython! {
54113 // skipped _Py_PARSE_INTPTR
55114 // skipped _Py_PARSE_UINTPTR
56115
57- // skipped non-limited _PyLong_UnsignedShort_Converter
58- // skipped non-limited _PyLong_UnsignedInt_Converter
59- // skipped non-limited _PyLong_UnsignedLong_Converter
60- // skipped non-limited _PyLong_UnsignedLongLong_Converter
61- // skipped non-limited _PyLong_Size_t_Converter
62-
63- // skipped non-limited _PyLong_DigitValue
64- // skipped non-limited _PyLong_Frexp
65-
66116 #[ cfg_attr( PyPy , link_name = "PyPyLong_AsDouble" ) ]
67117 pub fn PyLong_AsDouble ( arg1: * mut PyObject ) -> c_double;
68118 #[ cfg_attr( PyPy , link_name = "PyPyLong_FromVoidPtr" ) ]
@@ -89,17 +139,7 @@ extern_libpython! {
89139 ) -> * mut PyObject ;
90140}
91141
92- // skipped non-limited _PyLong_NumBits
93-
94- // skipped non-limited _PyLong_Format
95- // skipped non-limited _PyLong_FormatWriter
96- // skipped non-limited _PyLong_FormatBytesWriter
97- // skipped non-limited _PyLong_FormatAdvancedWriter
98-
99142extern_libpython ! {
100143 pub fn PyOS_strtoul ( arg1: * const c_char, arg2: * mut * mut c_char, arg3: c_int) -> c_ulong;
101144 pub fn PyOS_strtol ( arg1: * const c_char, arg2: * mut * mut c_char, arg3: c_int) -> c_long;
102145}
103-
104- // skipped non-limited _PyLong_Rshift
105- // skipped non-limited _PyLong_Lshift
0 commit comments