Skip to content

Commit 516829e

Browse files
Make the new C API not public.
1 parent 8a0f5f2 commit 516829e

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -993,12 +993,6 @@ New Features
993993

994994
(Contributed by Serhiy Storchaka in :gh:`108511`.)
995995

996-
* Add functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
997-
:c:func:`PySys_GetOptionalAttr` and :c:func:`PySys_GetOptionalAttrString`.
998-
They all are variants of :c:func:`PySys_GetObject` which return a new
999-
:term:`strong reference` and can set an exception on failure.
1000-
(Contributed by Serhiy Storchaka in :gh:`108512`.)
1001-
1002996
* If Python is built in :ref:`debug mode <debug-build>` or :option:`with
1003997
assertions <--with-assertions>`, :c:func:`PyTuple_SET_ITEM` and
1004998
:c:func:`PyList_SET_ITEM` now check the index argument with an assertion.

Include/cpython/sysmodule.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ PyAPI_FUNC(int) PySys_Audit(
1010
...);
1111
PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*);
1212

13+
PyAPI_FUNC(PyObject *) PySys_GetAttr(PyObject *);
14+
PyAPI_FUNC(PyObject *) PySys_GetAttrString(const char *);
15+
PyAPI_FUNC(int) PySys_GetOptionalAttr(PyObject *, PyObject **);
16+
PyAPI_FUNC(int) PySys_GetOptionalAttrString(const char *, PyObject **);
17+
1318
typedef struct {
1419
FILE* perf_map;
1520
PyThread_type_lock map_lock;

Include/sysmodule.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ extern "C" {
88
#endif
99

1010
PyAPI_FUNC(PyObject *) PySys_GetObject(const char *);
11-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030D0000
12-
PyAPI_FUNC(PyObject *) PySys_GetAttr(PyObject *);
13-
PyAPI_FUNC(PyObject *) PySys_GetAttrString(const char *);
14-
PyAPI_FUNC(int) PySys_GetOptionalAttr(PyObject *, PyObject **);
15-
PyAPI_FUNC(int) PySys_GetOptionalAttrString(const char *, PyObject **);
16-
#endif
1711
PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *);
1812

1913
PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Add functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
1+
Add private functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
22
:c:func:`PySys_GetOptionalAttr` and :c:func:`PySys_GetOptionalAttrString`.

0 commit comments

Comments
 (0)