Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc3d606

Browse files
committed
Fix to [ Bug #111165 ] doc-string removal masked by PYTHONOPTIMIZE
1 parent fa488ec commit dc3d606

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Python/pythonrun.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ Py_Initialize(void)
108108
initialized = 1;
109109

110110
if ((p = getenv("PYTHONDEBUG")) && *p != '\0')
111-
Py_DebugFlag = 1;
111+
Py_DebugFlag = Py_DebugFlag ? Py_DebugFlag : 1;
112112
if ((p = getenv("PYTHONVERBOSE")) && *p != '\0')
113-
Py_VerboseFlag = 1;
113+
Py_VerboseFlag = Py_VerboseFlag ? Py_VerboseFlag : 1;
114114
if ((p = getenv("PYTHONOPTIMIZE")) && *p != '\0')
115-
Py_OptimizeFlag = 1;
115+
Py_OptimizeFlag = Py_OptimizeFlag ? Py_OptimizeFlag : 1;
116116

117117
interp = PyInterpreterState_New();
118118
if (interp == NULL)

0 commit comments

Comments
 (0)