@@ -77,12 +77,33 @@ the module and a copyright notice if you like).
7777All user-visible symbols defined by :file: `Python.h ` have a prefix of ``Py `` or
7878``PY ``, except those defined in standard header files.
7979
80- For backward compatibility, :file: `!Python.h `
81- includes ``<stdio.h> ``, ``<string.h> ``, ``<errno.h> ``, and ``<stdlib.h> `` if
82- :c:macro: `Py_LIMITED_API ` is not defined or for limited C API version 3.10 and older.
83- The ``<ctype.h> `` and ``<unistd.h> `` headers are also not included for limited
84- C API version 3.13 and newer.
85-
80+ For backward compatibility, :file: `Python.h ` includes several standard header files.
81+ C extensions should include the standard headers that they use, and should not rely
82+ on these implicit includes.
83+ If using the limited C API version 3.13 or newer, the implicit includes are:
84+
85+ * ``<assert.h> ``
86+ * ``<intrin.h> `` (on Windows)
87+ * ``<inttypes.h> ``
88+ * ``<limits.h> ``
89+ * ``<math.h> ``
90+ * ``<stdarg.h> ``
91+ * ``<wchar.h> ``
92+ * ``<sys/types.h> `` (if present)
93+
94+ If :c:macro: `Py_LIMITED_API ` is not defined, or is set to version 3.12 or older,
95+ the headers below are also included:
96+
97+ * ``<ctype.h> ``
98+ * ``<unistd.h> `` (on POSIX)
99+
100+ If :c:macro: `Py_LIMITED_API ` is not defined, or is set to version 3.10 or older,
101+ the headers below are also included:
102+
103+ * ``<errno.h> ``
104+ * ``<stdio.h> ``
105+ * ``<stdlib.h> ``
106+ * ``<string.h> ``
86107
87108The next thing we add to our module file is the C function that will be called
88109when the Python expression ``spam.system(string) `` is evaluated (we'll see
0 commit comments