Introduce gdbpy_enter
authorTom Tromey <tom@tromey.com>
Mon, 7 Nov 2016 22:56:57 +0000 (15:56 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 11 Jan 2017 02:13:38 +0000 (19:13 -0700)
commit4ecee2c47da3e91c0571683acb5cfb8400402663
tree994e933254c61542c0d9aa5111525682bcd37b49
parent37fce74fb42f45ec340962170a4b297beede733a
Introduce gdbpy_enter

This introduces gdbpy_enter, a class that can be used to acquire and
release the Python GIL, and also set other Python-related globals used
by gdb.  ensure_python_env is rewritten in terms of this new class.

2017-01-10  Tom Tromey  <tom@tromey.com>

* python/python.c (gdbpy_enter): New constructor.
(~gdbpy_enter): New destructor.
(restore_python_env, ensure_python_env): Rewrite.
* python/python-internal.h (gdbpy_enter): New class.
gdb/ChangeLog
gdb/python/python-internal.h
gdb/python/python.c
This page took 0.02967 seconds and 4 git commands to generate.