pydebug.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef Py_LIMITED_API
  2. #ifndef Py_PYDEBUG_H
  3. #define Py_PYDEBUG_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* These global variable are defined in pylifecycle.c */
  8. /* XXX (ncoghlan): move these declarations to pylifecycle.h? */
  9. PyAPI_DATA(int) Py_DebugFlag;
  10. PyAPI_DATA(int) Py_VerboseFlag;
  11. PyAPI_DATA(int) Py_QuietFlag;
  12. PyAPI_DATA(int) Py_InteractiveFlag;
  13. PyAPI_DATA(int) Py_InspectFlag;
  14. PyAPI_DATA(int) Py_OptimizeFlag;
  15. PyAPI_DATA(int) Py_NoSiteFlag;
  16. PyAPI_DATA(int) Py_BytesWarningFlag;
  17. PyAPI_DATA(int) Py_FrozenFlag;
  18. PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
  19. PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
  20. PyAPI_DATA(int) Py_NoUserSiteDirectory;
  21. PyAPI_DATA(int) Py_UnbufferedStdioFlag;
  22. PyAPI_DATA(int) Py_HashRandomizationFlag;
  23. PyAPI_DATA(int) Py_IsolatedFlag;
  24. #ifdef MS_WINDOWS
  25. PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag;
  26. PyAPI_DATA(int) Py_LegacyWindowsStdioFlag;
  27. #endif
  28. /* this is a wrapper around getenv() that pays attention to
  29. Py_IgnoreEnvironmentFlag. It should be used for getting variables like
  30. PYTHONPATH and PYTHONHOME from the environment */
  31. #define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif /* !Py_PYDEBUG_H */
  36. #endif /* Py_LIMITED_API */