This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

RFA: a small python-value.c normalization


This patch removes a #if from python-value.c.

We define Py_ssize_t as int in the cases where this is needed --
Python 2.4.  So, a second test is not needed.

FYI, there was a previous thread on this topic:

    http://sourceware.org/ml/archer/2008-q4/msg00111.html

Ok?

Tom

2008-12-22  Tom Tromey  <tromey@redhat.com>

	* python/python-value.c (valpy_length): Remove #if.

diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c
index b23174c..9db7208 100644
--- a/gdb/python/python-value.c
+++ b/gdb/python/python-value.c
@@ -132,11 +132,7 @@ valpy_dereference (PyObject *self, PyObject *args)
   return value_to_value_object (res_val);
 }
 
-#ifdef HAVE_LIBPYTHON2_4
-static int
-#else
 static Py_ssize_t
-#endif
 valpy_length (PyObject *self)
 {
   /* We don't support getting the number of elements in a struct / class.  */


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