summaryrefslogtreecommitdiffstats
path: root/Include/cpython/pydebug.h
diff options
context:
space:
mode:
authorNicholas Sim <nsim@posteo.net>2021-02-19 14:55:46 (GMT)
committerGitHub <noreply@github.com>2021-02-19 14:55:46 (GMT)
commit4a6bf276ed3e6687394afe26b0d9a061ac06fc6b (patch)
tree249bba20a6ee0ca4ae9b2a1661a12443370e5e46 /Include/cpython/pydebug.h
parent839184f85cb2d2ad514fff9b431733d1c9607533 (diff)
downloadcpython-4a6bf276ed3e6687394afe26b0d9a061ac06fc6b.zip
cpython-4a6bf276ed3e6687394afe26b0d9a061ac06fc6b.tar.gz
cpython-4a6bf276ed3e6687394afe26b0d9a061ac06fc6b.tar.bz2
bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)
Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h} into Include/cpython/. Parser: peg_api: include Python.h instead of parser_interface.h.
Diffstat (limited to 'Include/cpython/pydebug.h')
-rw-r--r--Include/cpython/pydebug.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Include/cpython/pydebug.h b/Include/cpython/pydebug.h
new file mode 100644
index 0000000..78bcb11
--- /dev/null
+++ b/Include/cpython/pydebug.h
@@ -0,0 +1,38 @@
+#ifndef Py_LIMITED_API
+#ifndef Py_PYDEBUG_H
+#define Py_PYDEBUG_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+PyAPI_DATA(int) Py_DebugFlag;
+PyAPI_DATA(int) Py_VerboseFlag;
+PyAPI_DATA(int) Py_QuietFlag;
+PyAPI_DATA(int) Py_InteractiveFlag;
+PyAPI_DATA(int) Py_InspectFlag;
+PyAPI_DATA(int) Py_OptimizeFlag;
+PyAPI_DATA(int) Py_NoSiteFlag;
+PyAPI_DATA(int) Py_BytesWarningFlag;
+PyAPI_DATA(int) Py_FrozenFlag;
+PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
+PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
+PyAPI_DATA(int) Py_NoUserSiteDirectory;
+PyAPI_DATA(int) Py_UnbufferedStdioFlag;
+PyAPI_DATA(int) Py_HashRandomizationFlag;
+PyAPI_DATA(int) Py_IsolatedFlag;
+
+#ifdef MS_WINDOWS
+PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag;
+PyAPI_DATA(int) Py_LegacyWindowsStdioFlag;
+#endif
+
+/* this is a wrapper around getenv() that pays attention to
+ Py_IgnoreEnvironmentFlag. It should be used for getting variables like
+ PYTHONPATH and PYTHONHOME from the environment */
+#define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PYDEBUG_H */
+#endif /* Py_LIMITED_API */