* python/py-auto-load.c (source_section_scripts): Fix file
descriptor leak. * python/python.c (source_python_script_for_objfile): Tweak comments.
This commit is contained in:
parent
3c9057f381
commit
562f943bcc
3 changed files with 18 additions and 11 deletions
|
@ -903,7 +903,10 @@ gdbpy_progspaces (PyObject *unused1, PyObject *unused2)
|
|||
static struct objfile *gdbpy_current_objfile;
|
||||
|
||||
/* Set the current objfile to OBJFILE and then read STREAM,FILE as
|
||||
Python code. */
|
||||
Python code.
|
||||
STREAM is left open, it is up to the caller to close it.
|
||||
If an exception occurs python will print the traceback and
|
||||
clear the error indicator. */
|
||||
|
||||
void
|
||||
source_python_script_for_objfile (struct objfile *objfile,
|
||||
|
@ -914,8 +917,6 @@ source_python_script_for_objfile (struct objfile *objfile,
|
|||
cleanups = ensure_python_env (get_objfile_arch (objfile), current_language);
|
||||
gdbpy_current_objfile = objfile;
|
||||
|
||||
/* Note: If an exception occurs python will print the traceback and
|
||||
clear the error indicator. */
|
||||
PyRun_SimpleFile (stream, file);
|
||||
|
||||
do_cleanups (cleanups);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue