Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
4.1 KiB

  1. #ifndef Py_PYTHON_H
  2. #define Py_PYTHON_H
  3. /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
  4. /* Include nearly all Python header files */
  5. #include "patchlevel.h"
  6. #include "pyconfig.h"
  7. /* Cyclic gc is always enabled, starting with release 2.3a1. Supply the
  8. * old symbol for the benefit of extension modules written before then
  9. * that may be conditionalizing on it. The core doesn't use it anymore.
  10. */
  11. #ifndef WITH_CYCLE_GC
  12. #define WITH_CYCLE_GC 1
  13. #endif
  14. #include <limits.h>
  15. #ifndef UCHAR_MAX
  16. #error "Something's broken. UCHAR_MAX should be defined in limits.h."
  17. #endif
  18. #if UCHAR_MAX != 255
  19. #error "Python's source code assumes C's unsigned char is an 8-bit type."
  20. #endif
  21. #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
  22. #define _SGI_MP_SOURCE
  23. #endif
  24. #include <stdio.h>
  25. #ifndef NULL
  26. # error "Python.h requires that stdio.h define NULL."
  27. #endif
  28. #include <string.h>
  29. #ifdef HAVE_ERRNO_H
  30. #include <errno.h>
  31. #endif
  32. #include <stdlib.h>
  33. #ifdef HAVE_UNISTD_H
  34. #include <unistd.h>
  35. #endif
  36. /* For uintptr_t, intptr_t */
  37. #ifdef HAVE_STDDEF_H
  38. #include <stddef.h>
  39. #endif
  40. /* CAUTION: Build setups should ensure that NDEBUG is defined on the
  41. * compiler command line when building Python in release mode; else
  42. * assert() calls won't be removed.
  43. */
  44. #include <assert.h>
  45. #include "pyport.h"
  46. /* pyconfig.h or pyport.h may or may not define DL_IMPORT */
  47. #ifndef DL_IMPORT /* declarations for DLL import/export */
  48. #define DL_IMPORT(RTYPE) RTYPE
  49. #endif
  50. #ifndef DL_EXPORT /* declarations for DLL import/export */
  51. #define DL_EXPORT(RTYPE) RTYPE
  52. #endif
  53. /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
  54. * PYMALLOC_DEBUG is in error if pymalloc is not in use.
  55. */
  56. #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
  57. #define PYMALLOC_DEBUG
  58. #endif
  59. #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
  60. #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
  61. #endif
  62. #include "pymem.h"
  63. #include "object.h"
  64. #include "objimpl.h"
  65. #include "pydebug.h"
  66. #include "unicodeobject.h"
  67. #include "intobject.h"
  68. #include "boolobject.h"
  69. #include "longobject.h"
  70. #include "floatobject.h"
  71. #ifndef WITHOUT_COMPLEX
  72. #include "complexobject.h"
  73. #endif
  74. #include "rangeobject.h"
  75. #include "stringobject.h"
  76. #include "bufferobject.h"
  77. #include "tupleobject.h"
  78. #include "listobject.h"
  79. #include "dictobject.h"
  80. #include "enumobject.h"
  81. #include "setobject.h"
  82. #include "methodobject.h"
  83. #include "moduleobject.h"
  84. #include "funcobject.h"
  85. #include "classobject.h"
  86. #include "fileobject.h"
  87. #include "cobject.h"
  88. #include "traceback.h"
  89. #include "sliceobject.h"
  90. #include "cellobject.h"
  91. #include "iterobject.h"
  92. #include "genobject.h"
  93. #include "descrobject.h"
  94. #include "weakrefobject.h"
  95. #include "codecs.h"
  96. #include "pyerrors.h"
  97. #include "pystate.h"
  98. #include "pyarena.h"
  99. #include "modsupport.h"
  100. #include "pythonrun.h"
  101. #include "ceval.h"
  102. #include "sysmodule.h"
  103. #include "intrcheck.h"
  104. #include "import.h"
  105. #include "abstract.h"
  106. #include "compile.h"
  107. #include "eval.h"
  108. #include "pystrtod.h"
  109. /* _Py_Mangle is defined in compile.c */
  110. PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
  111. /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
  112. #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
  113. /* PyArg_NoArgs should not be necessary.
  114. Set ml_flags in the PyMethodDef to METH_NOARGS. */
  115. #define PyArg_NoArgs(v) PyArg_Parse(v, "")
  116. /* Convert a possibly signed character to a nonnegative int */
  117. /* XXX This assumes characters are 8 bits wide */
  118. #ifdef __CHAR_UNSIGNED__
  119. #define Py_CHARMASK(c) (c)
  120. #else
  121. #define Py_CHARMASK(c) ((c) & 0xff)
  122. #endif
  123. #include "pyfpe.h"
  124. /* These definitions must match corresponding definitions in graminit.h.
  125. There's code in compile.c that checks that they are the same. */
  126. #define Py_single_input 256
  127. #define Py_file_input 257
  128. #define Py_eval_input 258
  129. #ifdef HAVE_PTH
  130. /* GNU pth user-space thread support */
  131. #include <pth.h>
  132. #endif
  133. /* Define macros for inline documentation. */
  134. #define PyDoc_VAR(name) static char name[]
  135. #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
  136. #ifdef WITH_DOC_STRINGS
  137. #define PyDoc_STR(str) str
  138. #else
  139. #define PyDoc_STR(str) ""
  140. #endif
  141. #endif /* !Py_PYTHON_H */