Skip to content

Commit a4faae9

Browse files
committed
chore: Update stable_abi.txt to the latest main
Source: https://raw.githubusercontent.com/python/cpython/main/Misc/stable_abi.txt Remove a bogus unit test checking the input text file length. The number of Stable ABI functions and globals has not changed.
1 parent 82019f4 commit a4faae9

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

Misc/stable_abi.txt

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@
4242
# - a combination of the above (functions that were called by macros that
4343
# were public in the past)
4444

45+
# For structs, one of the following must be set:
46+
# - opaque: The struct name is available in the Limited API, but its members
47+
# are not. Users must manipulate it via pointers.
48+
# - members: Space-separated list of members which are part of the
49+
# Limited API and Stable ABI.
50+
# Members that aren't listed are not accessible to applications.
51+
# - full-abi: The entire struct -- all its members and its size -- is part of
52+
# the Stable ABI, and must not change.
53+
4554
# Removing items from this file is generally not allowed, and additions should
4655
# be considered with that in mind. See the devguide for exact rules:
4756
# https://devguide.python.org/c-api/#limited-api
@@ -54,40 +63,58 @@
5463

5564
struct PyObject
5665
added 3.2
66+
members ob_refcnt ob_type
5767
struct PyVarObject
5868
added 3.2
69+
members ob_base ob_size
5970
struct PyMethodDef
6071
added 3.2
72+
full-abi
6173
struct PyMemberDef
6274
added 3.2
75+
full-abi
6376
struct PyGetSetDef
6477
added 3.2
78+
full-abi
6579
struct PyModuleDef_Base
6680
added 3.2
81+
full-abi
6782
struct PyModuleDef
6883
added 3.2
84+
full-abi
6985
struct PyStructSequence_Field
7086
added 3.2
87+
full-abi
7188
struct PyStructSequence_Desc
7289
added 3.2
90+
full-abi
7391
struct PyType_Slot
7492
added 3.2
93+
full-abi
7594
struct PyType_Spec
7695
added 3.2
96+
full-abi
7797
struct PyThreadState
7898
added 3.2
99+
opaque
79100
struct PyInterpreterState
80101
added 3.2
102+
opaque
81103
struct PyFrameObject
82104
added 3.2
105+
opaque
83106
struct symtable
84107
added 3.2
108+
opaque
85109
struct PyWeakReference
86110
added 3.2
111+
opaque
87112
struct PyLongObject
88113
added 3.2
114+
opaque
89115
struct PyTypeObject
90116
added 3.2
117+
opaque
91118

92119
function PyType_FromSpec
93120
added 3.2
@@ -299,11 +326,11 @@ typedef newfunc
299326
added 3.2
300327
typedef allocfunc
301328
added 3.2
302-
struct PyCFunction
329+
typedef PyCFunction
303330
added 3.2
304-
struct PyCFunctionWithKeywords
331+
typedef PyCFunctionWithKeywords
305332
added 3.2
306-
struct PyCapsule_Destructor
333+
typedef PyCapsule_Destructor
307334
added 3.2
308335
typedef getter
309336
added 3.2
@@ -1760,6 +1787,7 @@ function PyThread_get_stacksize
17601787
function PyThread_get_thread_ident
17611788
added 3.2
17621789
function PyThread_get_thread_native_id
1790+
ifdef PY_HAVE_THREAD_NATIVE_ID
17631791
added 3.2
17641792
function PyThread_init_thread
17651793
added 3.2
@@ -2194,6 +2222,7 @@ data PyStructSequence_UnnamedField
21942222
# Add stable Py_buffer API in Python 3.11 (https://bugs.python.org/issue45459)
21952223
struct Py_buffer
21962224
added 3.11
2225+
full-abi
21972226
function PyObject_CheckBuffer
21982227
added 3.11
21992228
function PyObject_GetBuffer

src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,6 @@ mod tests {
305305
generate_implib_for_target(&dir, "aarch64", "msvc").unwrap();
306306
}
307307

308-
#[test]
309-
fn abi_defs_len() {
310-
assert_eq!(STABLE_ABI_DEFS.len(), 48836);
311-
}
312-
313308
#[test]
314309
fn parse_stable_abi_txt() {
315310
let stable_abi_exports = parse_stable_abi_defs(STABLE_ABI_DEFS);

0 commit comments

Comments
 (0)