diff options
author | Alexandra Hájková <ahajkova@redhat.com> | 2023-12-06 17:17:25 +0100 |
---|---|---|
committer | Alexandra Hájková <ahajkova@redhat.com> | 2023-12-13 10:46:39 +0100 |
commit | 7ae9ecfd80104a793ed1d836fd4dc0aa1a9c7832 (patch) | |
tree | 7883613b285070e95ec84213d6003b604dccc453 /gdb/python/python.c | |
parent | 5c5e642dc0f6b223c2339d8dee64fbc63eee8e1a (diff) | |
download | binutils-7ae9ecfd80104a793ed1d836fd4dc0aa1a9c7832.zip binutils-7ae9ecfd80104a793ed1d836fd4dc0aa1a9c7832.tar.gz binutils-7ae9ecfd80104a793ed1d836fd4dc0aa1a9c7832.tar.bz2 |
gdb: move gdbpy_gil into python-internal.h
Move gdbpy_gil class into python-internal.h, the next
commit wants to make use of this class from a file other
than python.c.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 832f374..2ca3c50 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -264,30 +264,6 @@ gdbpy_enter::finalize () python_gdbarch = current_inferior ()->arch (); } -/* A helper class to save and restore the GIL, but without touching - the other globals that are handled by gdbpy_enter. */ - -class gdbpy_gil -{ -public: - - gdbpy_gil () - : m_state (PyGILState_Ensure ()) - { - } - - ~gdbpy_gil () - { - PyGILState_Release (m_state); - } - - DISABLE_COPY_AND_ASSIGN (gdbpy_gil); - -private: - - PyGILState_STATE m_state; -}; - /* Set the quit flag. */ static void |