Use gdbpy_enter in python.c
authorTom Tromey <tom@tromey.com>
Sat, 12 Nov 2016 18:32:05 +0000 (11:32 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 11 Jan 2017 02:13:54 +0000 (19:13 -0700)
commita7785f8c797183eb363e95c201343df67d8536c6
treee01b321031d2d699f3b9f96d50f22d2bb48a91f7
parent2865bfce3875fa16046b0a987d98ab19fc8bbb9a
Use gdbpy_enter in python.c

This changes the last functions in python.c to use gdbpy_enter.  I
split gdbpy_finish_initialization into two functions in order to avoid
some "goto"s.

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

* python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
(do_finish_initialization): New function.  Use gdbpy_ref.
(gdbpy_finish_initialization): Use gdbpy_enter.  Call
do_finish_initialization.
gdb/ChangeLog
gdb/python/python.c