diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2025-08-14 12:41:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-14 12:41:49 -0500 |
commit | ac0ad5093ab451a36ea9ed34b0d3d461e759f4ea (patch) | |
tree | 947a60b54c61408da6b8b126ada241364efc3561 /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | 91418ecbdef0e259f83e6ddac5ddfc22a8b6eced (diff) | |
download | llvm-ac0ad5093ab451a36ea9ed34b0d3d461e759f4ea.zip llvm-ac0ad5093ab451a36ea9ed34b0d3d461e759f4ea.tar.gz llvm-ac0ad5093ab451a36ea9ed34b0d3d461e759f4ea.tar.bz2 |
[lldb] Use PyThread_get_thread_ident instead of accessing PyThreadState (#153460)
Use `PyThread_get_thread_ident`, which is part of the Stable API,
instead of accessing a member of the PyThreadState, which is opaque when
using the Stable API.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 5b97fcb..15ea5e99 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -909,11 +909,11 @@ bool ScriptInterpreterPythonImpl::Interrupt() { Log *log = GetLog(LLDBLog::Script); if (IsExecutingPython()) { - PyThreadState *state = PyThreadState_GET(); + PyThreadState *state = PyThreadState_Get(); if (!state) state = GetThreadState(); if (state) { - long tid = state->thread_id; + long tid = PyThread_get_thread_ident(); PyThreadState_Swap(state); int num_threads = PyThreadState_SetAsyncExc(tid, PyExc_KeyboardInterrupt); LLDB_LOGF(log, |