Skip to content

Commit 8a374fe

Browse files
committed
Add header file 'pydebug.h'.
1 parent 21f9126 commit 8a374fe

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

graalpython/com.oracle.graal.python.cext/include/Python.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
#include "import.h"
101101
#include "pycapsule.h"
102102
#include "pylifecycle.h"
103+
#include "pydebug.h"
103104

104105
// our impls
105106
#ifdef Py_True
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* Copyright (c) 2018, Oracle and/or its affiliates.
2+
* Copyright (C) 1996-2017 Python Software Foundation
3+
*
4+
* Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
5+
*/
6+
#ifndef Py_LIMITED_API
7+
#ifndef Py_PYDEBUG_H
8+
#define Py_PYDEBUG_H
9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
13+
/* These global variable are defined in pylifecycle.c */
14+
/* XXX (ncoghlan): move these declarations to pylifecycle.h? */
15+
PyAPI_DATA(int) Py_DebugFlag;
16+
PyAPI_DATA(int) Py_VerboseFlag;
17+
PyAPI_DATA(int) Py_QuietFlag;
18+
PyAPI_DATA(int) Py_InteractiveFlag;
19+
PyAPI_DATA(int) Py_InspectFlag;
20+
PyAPI_DATA(int) Py_OptimizeFlag;
21+
PyAPI_DATA(int) Py_NoSiteFlag;
22+
PyAPI_DATA(int) Py_BytesWarningFlag;
23+
PyAPI_DATA(int) Py_UseClassExceptionsFlag;
24+
PyAPI_DATA(int) Py_FrozenFlag;
25+
PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
26+
PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
27+
PyAPI_DATA(int) Py_NoUserSiteDirectory;
28+
PyAPI_DATA(int) Py_UnbufferedStdioFlag;
29+
PyAPI_DATA(int) Py_HashRandomizationFlag;
30+
PyAPI_DATA(int) Py_IsolatedFlag;
31+
32+
#ifdef MS_WINDOWS
33+
PyAPI_DATA(int) Py_LegacyWindowsStdioFlag;
34+
#endif
35+
36+
/* this is a wrapper around getenv() that pays attention to
37+
Py_IgnoreEnvironmentFlag. It should be used for getting variables like
38+
PYTHONPATH and PYTHONHOME from the environment */
39+
#define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
40+
41+
#ifdef __cplusplus
42+
}
43+
#endif
44+
#endif /* !Py_PYDEBUG_H */
45+
#endif /* Py_LIMITED_API */

0 commit comments

Comments
 (0)