cpython/Include
Victor Stinner a84181c31b
gh-140815: Fix faulthandler for invalid/freed frame (#140921)
faulthandler now detects if a frame or a code object is invalid or
freed.

Add helper functions:

* _PyCode_SafeAddr2Line()
* _PyFrame_SafeGetCode()
* _PyFrame_SafeGetLasti()

_PyMem_IsPtrFreed() now detects pointers in [-0xff, 0xff] range
as freed.
2025-11-04 11:48:28 +01:00
..
cpython gh-131253: free-threaded build support for pystats (gh-137189) 2025-11-03 11:36:37 -08:00
internal gh-140815: Fix faulthandler for invalid/freed frame (#140921) 2025-11-04 11:48:28 +01:00
abstract.h gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API (GH-135021) 2025-06-04 15:07:52 +02:00
audit.h gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921) 2025-06-26 13:05:01 +02:00
bltinmodule.h
boolobject.h gh-134989: Fix Py_RETURN_NONE in the limited C API (GH-135165) 2025-06-05 14:43:47 +02:00
bytearrayobject.h
bytesobject.h
ceval.h gh-135755: Move SPECIAL_ constants to a private header (GH-135922) 2025-06-25 13:03:05 +02:00
codecs.h
compile.h
complexobject.h
critical_section.h
datetime.h
descrobject.h
dictobject.h
dynamic_annotations.h
enumobject.h
errcode.h
exports.h
fileobject.h
fileutils.h gh-67341: fix a typo in Include/fileutils.h (#136049) 2025-07-14 08:02:05 +00:00
floatobject.h
frameobject.h
genericaliasobject.h
import.h gh-133644: remove deprecated PyImport_ImportModuleNoBlock (#133655) 2025-05-08 13:08:43 +00:00
intrcheck.h
iterobject.h
listobject.h
longobject.h gh-132639: Adds PyLong_AsNativeBytes, PyLong_FromNativeBytes and PyLong_FromUnsignedNativeBytes to the limited API (GH-132640) 2025-04-21 15:59:03 +01:00
marshal.h gh-79315: Add Include/cpython/marshal.h header (#139725) 2025-10-07 23:49:08 +02:00
memoryobject.h
methodobject.h gh-132097: use a macro for semantically casting function pointers (#132406) 2025-04-18 12:24:34 +02:00
modsupport.h gh-137210: Move PYTHON_API_VERSION & PYTHON_ABI_VERSION to patchlevel.h (GH-138545) 2025-09-08 12:02:13 +02:00
moduleobject.h gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212) 2025-09-05 16:23:18 +02:00
object.h gh-134786: raise error if Py_TPFLAGS_MANAGED_WEAKREF or Py_TPFLAGS_MANAGED_DICT is used without Py_TPFLAGS_HAVE_GC set (#135863) 2025-11-02 16:34:49 +05:30
objimpl.h
opcode.h gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700) 2025-02-07 22:39:54 +00:00
opcode_ids.h GH-134282: Always borrow references LOAD_CONST (GH-134284) 2025-05-20 11:24:11 -04:00
osdefs.h
osmodule.h
patchlevel.h Post 3.15.0a1 2025-10-14 17:36:01 +03:00
py_curses.h gh-125843: indicate which C function caused a curses.error (#125844) 2025-05-19 15:53:39 +02:00
pyatomic.h
pybuffer.h
pycapsule.h
pydtrace.d
pydtrace.h
pyerrors.h
pyexpat.h gh-90949: expose Expat API to tune exponential expansion protections (#139368) 2025-09-28 08:27:04 +00:00
pyframe.h
pyhash.h
pylifecycle.h gh-133644: Remove deprecated Python initialization getter functions (#133661) 2025-05-09 11:39:23 +00:00
pymacconfig.h
pymacro.h gh-138143: Allow anonymous unions in public headers, using _Py_ANONYMOUS (GH-137283) 2025-08-26 11:14:35 +02:00
pymath.h gh-136006: fix Py_NAN expansion on Solaris systems (#136575) 2025-09-10 11:11:04 +02:00
pymem.h
pyport.h gh-140544: Always assume that thread locals are available (GH-140690) 2025-10-28 09:07:19 -04:00
pystate.h
pystats.h
pystrcmp.h
pystrtod.h
Python.h gh-79315: Remove Include/pylock.h and Include/monitoring.h (#139731) 2025-10-08 00:49:24 +02:00
pythonrun.h gh-130396: Move PYOS_LOG2_STACK_MARGIN to internal headers (#135928) 2025-07-01 15:18:17 +02:00
pythread.h gh-137884: Added threading.get_native_id() on Illumos/Solaris (GH-137927) 2025-08-20 17:10:44 +00:00
pytypedefs.h
rangeobject.h
README.rst
refcount.h gh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (#140158) 2025-10-15 16:36:49 +02:00
setobject.h
sliceobject.h gh-79315: Add Include/cpython/sliceobject.h header (#139729) 2025-10-08 00:48:18 +02:00
structmember.h
structseq.h gh-79315: Add Include/cpython/structseq.h header (#139730) 2025-10-08 01:19:50 +02:00
sysmodule.h gh-138886: Remove deprecated PySys_ResetWarnOptions C-API function (#138887) 2025-09-15 12:01:33 +03:00
traceback.h
tupleobject.h
typeslots.h Revert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498) 2025-05-06 13:12:26 +03:00
unicodeobject.h gh-133610: Remove PyUnicode_AsDecoded/Encoded functions (#133612) 2025-05-09 17:31:24 +02:00
warnings.h
weakrefobject.h gh-133644: remove PyWeakref_GetObject and PyWeakref_GET_OBJECT (GH-133657) 2025-09-24 11:25:56 +02:00

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

The C API is divided into these sections:

1. ``Include/``: Limited API
2. ``Include/cpython/``: CPython implementation details
3. ``Include/cpython/``, names with the ``PyUnstable_`` prefix: API that can
   change between minor releases
4. ``Include/internal/``, and any name with ``_`` prefix: 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/