1 /**
2   Mirror _pydebug.h
3   */
4 module deimos.python.pydebug;
5 
6 import core.stdc.stdlib;
7 
8 import deimos.python.pyport;
9 
10 extern(C):
11 // Python-header-file: Include/node.h
12 
13 /// _
14 mixin(PyAPI_DATA!"int Py_DebugFlag");
15 /// _
16 mixin(PyAPI_DATA!"int Py_VerboseFlag");
17 version(Python_3_0_Or_Later) {
18     mixin(PyAPI_DATA!"int Py_QuietFlag");
19 }
20 /// _
21 mixin(PyAPI_DATA!"int Py_InteractiveFlag");
22 /// _
23 mixin(PyAPI_DATA!"int Py_OptimizeFlag");
24 /// _
25 mixin(PyAPI_DATA!"int Py_NoSiteFlag");
26 /// _
27 mixin(PyAPI_DATA!"int Py_UseClassExceptionsFlag");
28 /// _
29 mixin(PyAPI_DATA!"int Py_FrozenFlag");
30 version(Python_3_0_Or_Later) {
31 }else{
32     /// Availability: 2.*
33     mixin(PyAPI_DATA!"int Py_TabcheckFlag");
34     /// Availability: 2.*
35     mixin(PyAPI_DATA!"int Py_UnicodeFlag");
36 }
37 /// _
38 mixin(PyAPI_DATA!"int Py_IgnoreEnvironmentFlag");
39 /// _
40 mixin(PyAPI_DATA!"int Py_DivisionWarningFlag");
41 version(Python_2_6_Or_Later) {
42     /// Availability: >= 2.6
43     mixin(PyAPI_DATA!"int Py_DontWriteBytecodeFlag");
44     /// Availability: >= 2.6
45     mixin(PyAPI_DATA!"int Py_NoUserSiteDirectory");
46 }
47 
48 version(Python_3_0_Or_Later) {
49 }else{
50     /* _XXX Py_QnewFlag should go away in 3.0.  It's true iff -Qnew is passed,
51        on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
52        true divisions (which they will be in 3.0). */
53     /// Availability: 2.*
54     mixin(PyAPI_DATA!"int _Py_QnewFlag");
55 
56     version(Python_2_6_Or_Later) {
57         /// Availability: 2.6, 2.7
58         mixin(PyAPI_DATA!"int Py_Py3kWarningFlag");
59     }
60 }
61 version(Python_3_0_Or_Later) {
62     /// Availability: 3.*
63     mixin(PyAPI_DATA!"int Py_UnbufferedStdioFlag");
64 }
65 version(Python_2_7_Or_Later) {
66     /// Availability: >= 2.7
67     mixin(PyAPI_DATA!"int Py_HashRandomizationFlag");
68 }
69 
70 /** this is a wrapper around getenv() that pays attention to
71    Py_IgnoreEnvironmentFlag.  It should be used for getting variables like
72    PYTHONPATH and PYTHONHOME from the environment */
73 char* Py_GETENV()(const(char)* s) {
74     return (Py_IgnoreEnvironmentFlag ? null : getenv(s));
75 }
76 
77 /// _
78 void Py_FatalError(const(char)* message);
79