Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Python.h 3.5 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
  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. #include "pymacconfig.h"
  8. #include <limits.h>
  9. #ifndef UCHAR_MAX
  10. #error "Something's broken. UCHAR_MAX should be defined in limits.h."
  11. #endif
  12. #if UCHAR_MAX != 255
  13. #error "Python's source code assumes C's unsigned char is an 8-bit type."
  14. #endif
  15. #if defined(__sgi) && !defined(_SGI_MP_SOURCE)
  16. #define _SGI_MP_SOURCE
  17. #endif
  18. #include <stdio.h>
  19. #ifndef NULL
  20. # error "Python.h requires that stdio.h define NULL."
  21. #endif
  22. #include <string.h>
  23. #ifdef HAVE_ERRNO_H
  24. #include <errno.h>
  25. #endif
  26. #include <stdlib.h>
  27. #ifdef HAVE_UNISTD_H
  28. #include <unistd.h>
  29. #endif
  30. #ifdef HAVE_CRYPT_H
  31. #if defined(HAVE_CRYPT_R) && !defined(_GNU_SOURCE)
  32. /* Required for glibc to expose the crypt_r() function prototype. */
  33. # define _GNU_SOURCE
  34. # define _Py_GNU_SOURCE_FOR_CRYPT
  35. #endif
  36. #include <crypt.h>
  37. #ifdef _Py_GNU_SOURCE_FOR_CRYPT
  38. /* Don't leak the _GNU_SOURCE define to other headers. */
  39. # undef _GNU_SOURCE
  40. # undef _Py_GNU_SOURCE_FOR_CRYPT
  41. #endif
  42. #endif
  43. /* For size_t? */
  44. #ifdef HAVE_STDDEF_H
  45. #include <stddef.h>
  46. #endif
  47. /* CAUTION: Build setups should ensure that NDEBUG is defined on the
  48. * compiler command line when building Python in release mode; else
  49. * assert() calls won't be removed.
  50. */
  51. #include <assert.h>
  52. #include "pyport.h"
  53. #include "pymacro.h"
  54. /* A convenient way for code to know if clang's memory sanitizer is enabled. */
  55. #if defined(__has_feature)
  56. # if __has_feature(memory_sanitizer)
  57. # if !defined(_Py_MEMORY_SANITIZER)
  58. # define _Py_MEMORY_SANITIZER
  59. # endif
  60. # endif
  61. #endif
  62. #include "pyatomic.h"
  63. /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
  64. * PYMALLOC_DEBUG is in error if pymalloc is not in use.
  65. */
  66. #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
  67. #define PYMALLOC_DEBUG
  68. #endif
  69. #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
  70. #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
  71. #endif
  72. #include "pymath.h"
  73. #include "pytime.h"
  74. #include "pymem.h"
  75. #include "object.h"
  76. #include "objimpl.h"
  77. #include "typeslots.h"
  78. #include "pyhash.h"
  79. #include "pydebug.h"
  80. #include "bytearrayobject.h"
  81. #include "bytesobject.h"
  82. #include "unicodeobject.h"
  83. #include "longobject.h"
  84. #include "longintrepr.h"
  85. #include "boolobject.h"
  86. #include "floatobject.h"
  87. #include "complexobject.h"
  88. #include "rangeobject.h"
  89. #include "memoryobject.h"
  90. #include "tupleobject.h"
  91. #include "listobject.h"
  92. #include "dictobject.h"
  93. #include "odictobject.h"
  94. #include "enumobject.h"
  95. #include "setobject.h"
  96. #include "methodobject.h"
  97. #include "moduleobject.h"
  98. #include "funcobject.h"
  99. #include "classobject.h"
  100. #include "fileobject.h"
  101. #include "pycapsule.h"
  102. #include "traceback.h"
  103. #include "sliceobject.h"
  104. #include "cellobject.h"
  105. #include "iterobject.h"
  106. #include "genobject.h"
  107. #include "descrobject.h"
  108. #include "warnings.h"
  109. #include "weakrefobject.h"
  110. #include "structseq.h"
  111. #include "namespaceobject.h"
  112. #include "codecs.h"
  113. #include "pyerrors.h"
  114. #include "pystate.h"
  115. #include "context.h"
  116. #include "pyarena.h"
  117. #include "modsupport.h"
  118. #include "compile.h"
  119. #include "pythonrun.h"
  120. #include "pylifecycle.h"
  121. #include "ceval.h"
  122. #include "sysmodule.h"
  123. #include "osmodule.h"
  124. #include "intrcheck.h"
  125. #include "import.h"
  126. #include "abstract.h"
  127. #include "bltinmodule.h"
  128. #include "eval.h"
  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. #endif /* !Py_PYTHON_H */
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...