This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] [python] Make GDB buildable on python without threads.


Greetings,

Getting back into the swing ...
My freshly-pulled archer-tromey-python failed to build with:

cc1: warnings being treated as errors
../../gdb/python/python.c: In function '_initialize_python':
../../gdb/python/python.c:1503: error: implicit declaration of
function 'PyEval_ReleaseLock'
make[2]: *** [python.o] Error 1

This is because my Python 2.4.5 was configured with --without-threads.

Ok to commit?

Thanks,

-- 
Paul Pluzhnikov

2008-12-15  Paul Pluzhnikov  <ppluzhnikov@google.com>

	python/python.c (_initialize_python): Allow build with non-threaded
	Python.
	

diff --git a/gdb/python/python.c b/gdb/python/python.c
index fd84f60..a040de0 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1500,7 +1500,10 @@ if hasattr (gdb, 'datadir'):\n\

   /* Release the GIL while gdb runs.  */
   PyThreadState_Swap (NULL);
+
+#if WITH_THREAD /* If Python was built with thread support.  */
   PyEval_ReleaseLock ();
+#endif

 #endif /* HAVE_PYTHON */
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]