diff options
author | Andreas Schwab <schwab@suse.de> | 2012-09-21 12:57:31 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2012-09-21 12:57:31 +0000 |
commit | a95f2d3a4ae547c500b79b1cf9eac872b33ae3e4 (patch) | |
tree | 7ac75b714799257e3d71c7332a379bd474f79cd4 | |
parent | d30ecaafaad8ff0624d5fe5496bee24700b61a77 (diff) | |
download | gdb-a95f2d3a4ae547c500b79b1cf9eac872b33ae3e4.tar.gz |
* python/python.c (finalize_python): Only define if HAVE_PYTHON.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/python/python.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a956b4b9762..2fb946d9d4b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-09-21 Andreas Schwab <schwab@linux-m68k.org> + + * python/python.c (finalize_python): Only define if HAVE_PYTHON. + 2012-09-21 Siddhesh Poyarekar <siddhesh@redhat.com> * eval.c (evaluate_subexp_standard): Eliminate single-use diff --git a/gdb/python/python.c b/gdb/python/python.c index c66dc60356f..97f85060544 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1266,6 +1266,8 @@ user_show_python (char *args, int from_tty) /* Initialize the Python code. */ +#ifdef HAVE_PYTHON + /* This is installed as a final cleanup and cleans up the interpreter. This lets Python's 'atexit' work. */ @@ -1283,6 +1285,7 @@ finalize_python (void *ignore) Py_Finalize (); } +#endif /* Provide a prototype to silence -Wmissing-prototypes. */ extern initialize_file_ftype _initialize_python; |