Skip to content
  • Tom Tromey's avatar
    Introduce gdbpy_enter · 4ecee2c4
    Tom Tromey authored
    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.
    4ecee2c4