Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/python3.14/Python.h
1 // Entry point of the Python C API. 2 // C extensions should only #include <Python.h>, and not include directly 3 // the other Python header files included by <Python.h>. 4 5 #ifndef Py_PYTHON_H 6 #define Py_PYTHON_H 7 8 // Since this is a "meta-include" file, "#ifdef __cplusplus / extern "C" {" 9 // is not needed. 10 11 12 // Include Python header files 13 #include "patchlevel.h" 14 #include "pyconfig.h" 15 #include "pymacconfig.h" 16 17 18 // Include standard header files 19 // When changing these files, remember to update Doc/extending/extending.rst. 20 #include <assert.h> // assert() 21 #include <inttypes.h> // uintptr_t 22 #include <limits.h> // INT_MAX 23 #include <math.h> // HUGE_VAL 24 #include <stdarg.h> // va_list 25 #include <wchar.h> // wchar_t 26 #ifdef HAVE_SYS_TYPES_H 27 # include <sys/types.h> // ssize_t 28 #endif 29 30 // <errno.h>, <stdio.h>, <stdlib.h> and <string.h> headers are no longer used 31 // by Python, but kept for the backward compatibility of existing third party C 32 // extensions. They are not included by limited C API version 3.11 and newer. 33 // 34 // The <ctype.h> and <unistd.h> headers are not included by limited C API 35 // version 3.13 and newer. 36 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 37 # include <errno.h> // errno 38 # include <stdio.h> // FILE* 39 # include <stdlib.h> // getenv() 40 # include <string.h> // memcpy() 41 #endif 42 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030d0000 43 # include <ctype.h> // tolower() 44 # ifndef MS_WINDOWS 45 # include <unistd.h> // close() 46 # endif 47 #endif 48 49 // gh-111506: The free-threaded build is not compatible with the limited API 50 // or the stable ABI. 51 #if defined(Py_LIMITED_API) && defined(Py_GIL_DISABLED) 52 # error "The limited API is not currently supported in the free-threaded build" 53 #endif 54 55 #if defined(Py_GIL_DISABLED) && defined(_MSC_VER) 56 # include <intrin.h> // __readgsqword() 57 #endif 58 59 #if defined(Py_GIL_DISABLED) && defined(__MINGW32__) 60 # include <intrin.h> // __readgsqword() 61 #endif 62 63 // Include Python header files 64 #include "pyport.h" 65 #include "pymacro.h" 66 #include "pymath.h" 67 #include "pymem.h" 68 #include "pytypedefs.h" 69 #include "pybuffer.h" 70 #include "pystats.h" 71 #include "pyatomic.h" 72 #include "lock.h" 73 #include "critical_section.h" 74 #include "object.h" 75 #include "refcount.h" 76 #include "objimpl.h" 77 #include "typeslots.h" 78 #include "pyhash.h" 79 #include "cpython/pydebug.h" 80 #include "bytearrayobject.h" 81 #include "bytesobject.h" 82 #include "unicodeobject.h" 83 #include "pyerrors.h" 84 #include "longobject.h" 85 #include "cpython/longintrepr.h" 86 #include "boolobject.h" 87 #include "floatobject.h" 88 #include "complexobject.h" 89 #include "rangeobject.h" 90 #include "memoryobject.h" 91 #include "tupleobject.h" 92 #include "listobject.h" 93 #include "dictobject.h" 94 #include "cpython/odictobject.h" 95 #include "enumobject.h" 96 #include "setobject.h" 97 #include "methodobject.h" 98 #include "moduleobject.h" 99 #include "monitoring.h" 100 #include "cpython/funcobject.h" 101 #include "cpython/classobject.h" 102 #include "fileobject.h" 103 #include "pycapsule.h" 104 #include "cpython/code.h" 105 #include "pyframe.h" 106 #include "traceback.h" 107 #include "sliceobject.h" 108 #include "cpython/cellobject.h" 109 #include "iterobject.h" 110 #include "cpython/initconfig.h" 111 #include "pystate.h" 112 #include "cpython/genobject.h" 113 #include "descrobject.h" 114 #include "genericaliasobject.h" 115 #include "warnings.h" 116 #include "weakrefobject.h" 117 #include "structseq.h" 118 #include "cpython/picklebufobject.h" 119 #include "cpython/pytime.h" 120 #include "codecs.h" 121 #include "pythread.h" 122 #include "cpython/context.h" 123 #include "modsupport.h" 124 #include "compile.h" 125 #include "pythonrun.h" 126 #include "pylifecycle.h" 127 #include "ceval.h" 128 #include "sysmodule.h" 129 #include "audit.h" 130 #include "osmodule.h" 131 #include "intrcheck.h" 132 #include "import.h" 133 #include "abstract.h" 134 #include "bltinmodule.h" 135 #include "cpython/pyctype.h" 136 #include "pystrtod.h" 137 #include "pystrcmp.h" 138 #include "fileutils.h" 139 #include "cpython/pyfpe.h" 140 #include "cpython/tracemalloc.h" 141 142 #endif /* !Py_PYTHON_H */