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]

Re: [RFA v2 2/2] Fix PR python/17386 - add __index__ method to gdb.Value


Ulrich> Nothing defines HAVE_LIBPYTHON_2_4 on my machine; instead, we
Ulrich> seem to have
Ulrich> /* Define if Python 2.4 is being used. */
Ulrich> #define HAVE_LIBPYTHON2_4 1
Ulrich> in config.h ...  Typo?

Yes, sorry about that.
I'm fixing it as appended.

Tom

commit 7bd787e8774f96712d2e15a4094f094e00ff45ba
Author: Tom Tromey <tom@tromey.com>
Date:   Wed May 25 07:54:44 2016 -0600

    fix spelling of HAVE_LIBPYTHON2_4 in py-value.c
    
    Ulrich pointed out that an earlier patch had misspelled
    HAVE_LIBPYTHON2_4, adding an extra "_".  This caused a build failure.
    This patch fixes the bug.
    
    2016-05-25  Tom Tromey  <tom@tromey.com>
    
    	* python/py-value.c (value_object_as_number): Use correct spelling
    	of HAVE_LIBPYTHON2_4.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d99ea83..6609f9c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-25  Tom Tromey  <tom@tromey.com>
+
+	* python/py-value.c (value_object_as_number): Use correct spelling
+	of HAVE_LIBPYTHON2_4.
+
 2016-05-25  Bernhard Heckel  <bernhard.heckel@intel.com>
 
 	* f-typeprint.c (f_type_print_base): Replace 0 by show.
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 7a2a235..21e9247 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -1841,10 +1841,10 @@ static PyNumberMethods value_object_as_number = {
   valpy_divide,               /* nb_true_divide */
   NULL,			      /* nb_inplace_floor_divide */
   NULL,			      /* nb_inplace_true_divide */
-#ifndef HAVE_LIBPYTHON_2_4
+#ifndef HAVE_LIBPYTHON2_4
   /* This was added in Python 2.5.  */
   valpy_long,		      /* nb_index */
-#endif /* HAVE_LIBPYTHON_2_4 */
+#endif /* HAVE_LIBPYTHON2_4 */
 };
 
 static PyMappingMethods value_object_as_mapping = {


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