Skip to content

Commit 6c98a4a

Browse files
medismailbenarichardson
authored andcommitted
[lldb] Fix misleading indentiation warning in ScriptInterpreterPython (NFC) (#70732)
This should silence the "misleading indentiation" warnings introduced by b2929be, by adding an no-op if-statement, if the surrounding if-statement have been compiled out. Signed-off-by: Med Ismail Bennani <[email protected]> (cherry picked from commit 8a786be)
1 parent d79e98e commit 6c98a4a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ struct InitializePythonRAII {
192192
// Python 3.13. It has been returning `true` always since Python 3.7.
193193
#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 9) || (PY_MAJOR_VERSION < 3)
194194
if (PyEval_ThreadsInitialized()) {
195+
#else
196+
if (true) {
195197
#endif
196198
Log *log = GetLog(LLDBLog::Script);
197199

@@ -208,6 +210,8 @@ struct InitializePythonRAII {
208210

209211
// InitThreads acquires the GIL if it hasn't been called before.
210212
PyEval_InitThreads();
213+
#else
214+
}
211215
#endif
212216
}
213217

0 commit comments

Comments
 (0)