This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RFA: a small python-value.c normalization
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 22 Dec 2008 09:23:18 -0700
- Subject: RFA: a small python-value.c normalization
- Reply-to: Tom Tromey <tromey at redhat dot com>
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. */