[Python-checkins] bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331)

encukou webhook-mailer at python.org
Thu Oct 21 04:47:21 EDT 2021


https://github.com/python/cpython/commit/2cbf50e8126905b57ba9d0d5aa4e238c817d5a03
commit: 2cbf50e8126905b57ba9d0d5aa4e238c817d5a03
branch: main
author: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com>
committer: encukou <encukou at gmail.com>
date: 2021-10-21T10:46:48+02:00
summary:

bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331)

files:
A Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst
M Doc/data/stable_abi.dat
M Include/structseq.h
M Misc/stable_abi.txt
M PC/python3dll.c

diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
index b41027dee87bc..46ee321b660c3 100644
--- a/Doc/data/stable_abi.dat
+++ b/Doc/data/stable_abi.dat
@@ -569,6 +569,7 @@ function,PyStructSequence_GetItem,3.2,
 function,PyStructSequence_New,3.2,
 function,PyStructSequence_NewType,3.2,
 function,PyStructSequence_SetItem,3.2,
+var,PyStructSequence_UnnamedField,3.11,
 var,PySuper_Type,3.2,
 function,PySys_AddWarnOption,3.2,
 function,PySys_AddWarnOptionUnicode,3.2,
diff --git a/Include/structseq.h b/Include/structseq.h
index 8f51c89163a4e..e89265a67c322 100644
--- a/Include/structseq.h
+++ b/Include/structseq.h
@@ -19,7 +19,7 @@ typedef struct PyStructSequence_Desc {
     int n_in_sequence;
 } PyStructSequence_Desc;
 
-extern const char * const PyStructSequence_UnnamedField;
+PyAPI_DATA(const char * const) PyStructSequence_UnnamedField;
 
 #ifndef Py_LIMITED_API
 PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
diff --git a/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst b/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst
new file mode 100644
index 0000000000000..79ba8aa07cde6
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst	
@@ -0,0 +1 @@
+:c:var:`PyStructSequence_UnnamedField` is added to the Stable ABI.
diff --git a/Misc/stable_abi.txt b/Misc/stable_abi.txt
index 8e79f52130622..23e5b96a0e8a7 100644
--- a/Misc/stable_abi.txt
+++ b/Misc/stable_abi.txt
@@ -2149,6 +2149,8 @@ function PyType_GetName
     added 3.11
 function PyType_GetQualName
     added 3.11
+data PyStructSequence_UnnamedField
+    added 3.11
 
 # (Detailed comments aren't really needed for further entries: from here on
 #  we can use version control logs.)
diff --git a/PC/python3dll.c b/PC/python3dll.c
index 49b51e69d626e..d9e6fd3e7ca7c 100755
--- a/PC/python3dll.c
+++ b/PC/python3dll.c
@@ -842,6 +842,7 @@ EXPORT_DATA(PySeqIter_Type)
 EXPORT_DATA(PySet_Type)
 EXPORT_DATA(PySetIter_Type)
 EXPORT_DATA(PySlice_Type)
+EXPORT_DATA(PyStructSequence_UnnamedField)
 EXPORT_DATA(PySuper_Type)
 EXPORT_DATA(PyTraceBack_Type)
 EXPORT_DATA(PyTuple_Type)



More information about the Python-checkins mailing list