File: /Users/paulross/dev/Python-3.6.2/Include/Python.h

Green shading in the line number column means the source is part of the translation unit, red means it is conditionally excluded. Highlighted line numbers link to the translation unit page. Highlighted macros link to the macro page.

       1: #ifndef Py_PYTHON_H
       2: #define Py_PYTHON_H
       3: /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
       4: 
       5: /* Include nearly all Python header files */
       6: 
       7: #include "patchlevel.h"
       8: #include "pyconfig.h"
       9: #include "pymacconfig.h"
      10: 
      11: #include <limits.h>
      12: 
      13: #ifndef UCHAR_MAX
      14: #error "Something's broken.  UCHAR_MAX should be defined in limits.h."
      15: #endif
      16: 
      17: #if UCHAR_MAX != 255
      18: #error "Python's source code assumes C's unsigned char is an 8-bit type."
      19: #endif
      20: 
      21: #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
      22: #define _SGI_MP_SOURCE
      23: #endif
      24: 
      25: #include <stdio.h>
      26: #ifndef NULL
      27: #   error "Python.h requires that stdio.h define NULL."
      28: #endif
      29: 
      30: #include <string.h>
      31: #ifdef HAVE_ERRNO_H
      32: #include <errno.h>
      33: #endif
      34: #include <stdlib.h>
      35: #ifdef HAVE_UNISTD_H
      36: #include <unistd.h>
      37: #endif
      38: 
      39: /* For size_t? */
      40: #ifdef HAVE_STDDEF_H
      41: #include <stddef.h>
      42: #endif
      43: 
      44: /* CAUTION:  Build setups should ensure that NDEBUG is defined on the
      45:  * compiler command line when building Python in release mode; else
      46:  * assert() calls won't be removed.
      47:  */
      48: #include <assert.h>
      49: 
      50: #include "pyport.h"
      51: #include "pymacro.h"
      52: 
      53: #include "pyatomic.h"
      54: 
      55: /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
      56:  *  PYMALLOC_DEBUG is in error if pymalloc is not in use.
      57:  */
      58: #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
      59: #define PYMALLOC_DEBUG
      60: #endif
      61: #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
      62: #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
      63: #endif
      64: #include "pymath.h"
      65: #include "pytime.h"
      66: #include "pymem.h"
      67: 
      68: #include "object.h"
      69: #include "objimpl.h"
      70: #include "typeslots.h"
      71: #include "pyhash.h"
      72: 
      73: #include "pydebug.h"
      74: 
      75: #include "bytearrayobject.h"
      76: #include "bytesobject.h"
      77: #include "unicodeobject.h"
      78: #include "longobject.h"
      79: #include "longintrepr.h"
      80: #include "boolobject.h"
      81: #include "floatobject.h"
      82: #include "complexobject.h"
      83: #include "rangeobject.h"
      84: #include "memoryobject.h"
      85: #include "tupleobject.h"
      86: #include "listobject.h"
      87: #include "dictobject.h"
      88: #include "odictobject.h"
      89: #include "enumobject.h"
      90: #include "setobject.h"
      91: #include "methodobject.h"
      92: #include "moduleobject.h"
      93: #include "funcobject.h"
      94: #include "classobject.h"
      95: #include "fileobject.h"
      96: #include "pycapsule.h"
      97: #include "traceback.h"
      98: #include "sliceobject.h"
      99: #include "cellobject.h"
     100: #include "iterobject.h"
     101: #include "genobject.h"
     102: #include "descrobject.h"
     103: #include "warnings.h"
     104: #include "weakrefobject.h"
     105: #include "structseq.h"
     106: #include "namespaceobject.h"
     107: 
     108: #include "codecs.h"
     109: #include "pyerrors.h"
     110: 
     111: #include "pystate.h"
     112: 
     113: #include "pyarena.h"
     114: #include "modsupport.h"
     115: #include "pythonrun.h"
     116: #include "pylifecycle.h"
     117: #include "ceval.h"
     118: #include "sysmodule.h"
     119: #include "osmodule.h"
     120: #include "intrcheck.h"
     121: #include "import.h"
     122: 
     123: #include "abstract.h"
     124: #include "bltinmodule.h"
     125: 
     126: #include "compile.h"
     127: #include "eval.h"
     128: 
     129: #include "pyctype.h"
     130: #include "pystrtod.h"
     131: #include "pystrcmp.h"
     132: #include "dtoa.h"
     133: #include "fileutils.h"
     134: #include "pyfpe.h"
     135: 
     136: #endif /* !Py_PYTHON_H */
     137: