This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix build if !HAVE_PYTHON
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: gdb-patches at sourceware dot org
- Date: Fri, 21 Sep 2012 14:57:49 +0200
- Subject: Fix build if !HAVE_PYTHON
Committed as obvious.
Andreas.
* python/python.c (finalize_python): Only define if HAVE_PYTHON.
diff --git a/gdb/python/python.c b/gdb/python/python.c
index c66dc60..13a7bdc 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1266,6 +1266,7 @@ 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 +1284,7 @@ finalize_python (void *ignore)
Py_Finalize ();
}
+#endif
/* Provide a prototype to silence -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_python;
--
1.7.12.1
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."