cpython/Include
Victor Stinner 71d8775fee
gh-93202: Always use %zd printf formatter (#93201)
Python now always use the ``%zu`` and ``%zd`` printf formats to
format a size_t or Py_ssize_t number. Building Python 3.12 requires a
C11 compiler, so these printf formats are now always supported.

* PyObject_Print() and _PyObject_Dump() now use the printf %zd format
  to display an object reference count.
* Update PY_FORMAT_SIZE_T comment.
* Remove outdated notes about the %zd format in PyBytes_FromFormat()
  and PyUnicode_FromFormat() documentations.
* configure no longer checks for the %zd format and no longer defines
  PY_FORMAT_SIZE_T macro in pyconfig.h.
* pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is
  no longer supported. Python 3.12 now requires macOS 10.6 (Snow
  Leopard) or newer.
2022-05-25 14:21:36 +02:00
..
cpython gh-92536: Mark PyUnicode_READY() argument as unused (#93011) 2022-05-23 16:15:09 +02:00
internal gh-93065: Fix HAMT to iterate correctly over 7-level deep trees (GH-93066) 2022-05-23 21:09:59 +02:00
abstract.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
bltinmodule.h
boolobject.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
bytearrayobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
bytesobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
ceval.h bpo-45434: Remove Include/eval.h header file (GH-28973) 2021-10-15 13:06:05 +02:00
codecs.h
compile.h
complexobject.h bpo-35134: Add Include/cpython/complexobject.h header (GH-32383) 2022-04-07 01:05:27 +02:00
datetime.h
descrobject.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
dictobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
dynamic_annotations.h
enumobject.h
errcode.h bpo-46521: Fix codeop to use a new partial-input mode of the parser (GH-31010) 2022-02-08 11:54:37 +00:00
exports.h
fileobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
fileutils.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
floatobject.h bpo-46656: Remove Py_NO_NAN macro (GH-31160) 2022-02-25 01:32:57 +01:00
frameobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
genericaliasobject.h
import.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
intrcheck.h
iterobject.h
listobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
longobject.h bpo-45459: Add pytypedefs.h header file (GH-31527) 2022-02-24 17:07:12 +01:00
marshal.h bpo-45474: Exclude all of marshal.h if Py_LIMITED_API is defined (GH-29061) 2021-10-20 02:32:14 -07:00
memoryobject.h bpo-45459: Add Py_buffer to limited API (GH-29991) 2022-02-02 07:03:10 -08:00
methodobject.h gh-92135: Rename _Py_reinterpret_cast() to _Py_CAST() (#92230) 2022-05-03 16:37:06 +02:00
modsupport.h gh-79315: Add Include/cpython/modsupport.h header (#91797) 2022-04-21 23:00:26 +02:00
moduleobject.h gh-91321: Fix PyModuleDef_HEAD_INIT on C++ (#92259) 2022-05-03 22:40:20 +02:00
object.h Improve object stats (#92845) 2022-05-16 14:35:11 +01:00
objimpl.h gh-92135: Rename _Py_reinterpret_cast() to _Py_CAST() (#92230) 2022-05-03 16:37:06 +02:00
opcode.h GH-89914: Make the oparg of the YIELD_VALUE instruction equal the stack depth. (GH-92960) 2022-05-19 17:49:29 +01:00
osdefs.h
osmodule.h
patchlevel.h Python 3.12.0a0 2022-05-08 03:40:52 +01:00
py_curses.h bpo-46417: Add _PyType_CAST() macro (GH-30760) 2022-01-21 21:39:01 +01:00
pybuffer.h bpo-45459: Add pytypedefs.h header file (GH-31527) 2022-02-24 17:07:12 +01:00
pycapsule.h
pydtrace.d
pydtrace.h
pyerrors.h gh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531) 2022-04-15 19:57:47 +01:00
pyexpat.h
pyframe.h bpo-45459: Add pytypedefs.h header file (GH-31527) 2022-02-24 17:07:12 +01:00
pyhash.h bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752) 2021-10-10 17:29:46 +09:00
pylifecycle.h bpo-43931: Export Python version as API data (GH-25577) 2021-12-09 17:52:05 -08:00
pymacconfig.h gh-93202: Always use %zd printf formatter (#93201) 2022-05-25 14:21:36 +02:00
pymacro.h gh-91731: Fix typo in pymacro.h (#92618) 2022-05-10 13:47:22 +01:00
pymath.h bpo-46656: Remove Py_NO_NAN macro (GH-31160) 2022-02-25 01:32:57 +01:00
pymem.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
pyport.h gh-93202: Always use %zd printf formatter (#93201) 2022-05-25 14:21:36 +02:00
pystate.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
pystats.h Split refcount stats into 'interpreter' and 'non-interpreter' (GH-92919) 2022-05-18 14:38:43 +01:00
pystrcmp.h
pystrtod.h bpo-45995: add "z" format specifer to coerce negative 0 to zero (GH-30049) 2022-04-11 15:34:18 +01:00
Python.h bpo-35134: Remove the Include/code.h header file (GH-32385) 2022-04-07 02:29:52 +02:00
pythonrun.h Docs: Clarify availability of PyOS_CheckStack (GH-91816) 2022-04-22 12:44:43 +02:00
pythread.h bpo-42047: Add native thread ID for DragonFlyBSD (#22714) 2022-05-18 15:10:10 +02:00
pytypedefs.h bpo-45459: Fix PyModuleDef_Slot type in the limited C API (GH-31668) 2022-03-03 23:06:55 +01:00
rangeobject.h
README.rst
setobject.h bpo-35134: Add Include/cpython/setobject.h header (GH-32384) 2022-04-07 01:26:24 +02:00
sliceobject.h
structmember.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
structseq.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
sysmodule.h gh-88279: Deprecate PySys_SetArgvEx() (#92363) 2022-05-06 05:24:29 +02:00
traceback.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
tracemalloc.h
tupleobject.h bpo-45434: Remove useless space in includes (GH-28963) 2021-10-15 01:50:04 +02:00
typeslots.h bpo-45459: Add Py_buffer to limited API (GH-29991) 2022-02-02 07:03:10 -08:00
unicodeobject.h gh-93103: Update PyUnicode_DecodeFSDefault() doc (#93105) 2022-05-23 14:56:59 +02:00
warnings.h bpo-35134: Split warnings.h and weakrefobject.h (GH-29042) 2021-10-19 01:31:57 +02:00
weakrefobject.h bpo-35134: Split warnings.h and weakrefobject.h (GH-29042) 2021-10-19 01:31:57 +02:00

The Python C API
================

The C API is divided into three sections:

1. ``Include/``: Limited API
2. ``Include/cpython/``: CPython implementation details
3. ``Include/internal/``: The internal API

Information on changing the C API is available `in the developer guide`_

.. _in the developer guide: https://devguide.python.org/c-api/