|
| 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