From patchwork Wed May 25 14:03:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 12512 Received: (qmail 70053 invoked by alias); 25 May 2016 14:04:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 68997 invoked by uid 89); 25 May 2016 14:04:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1739, HTo:U*uweigand X-HELO: gproxy8-pub.mail.unifiedlayer.com Received: from gproxy8-pub.mail.unifiedlayer.com (HELO gproxy8-pub.mail.unifiedlayer.com) (67.222.33.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Wed, 25 May 2016 14:04:13 +0000 Received: (qmail 10246 invoked by uid 0); 25 May 2016 14:04:12 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy8.mail.unifiedlayer.com with SMTP; 25 May 2016 14:04:12 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id ye3z1s0182f2jeq01e42XS; Wed, 25 May 2016 08:04:12 -0600 X-Authority-Analysis: v=2.1 cv=EftbHpWC c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=PnD2wP_eR3oA:10 a=_v2sUkyEFrwA:10 a=yrkiwgmsf1kA:10 a=zstS-IiYAAAA:8 a=QyXUC8HyAAAA:8 a=CxH_mFt9Rg1UgkvdaKUA:9 a=EW1fgrNImLBsCPsh:21 a=ux_AFNdf-eV2bTYp:21 a=4G6NA9xxw8l3yy4pmD5M:22 a=avl4LiGQNoF5OB0DmCJ7:22 Received: from [71.215.116.141] (port=53152 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_2) (envelope-from ) id 1b5ZPj-0003ma-EP; Wed, 25 May 2016 08:03:59 -0600 From: Tom Tromey To: "Ulrich Weigand" Cc: tom@tromey.com (Tom Tromey), gdb-patches@sourceware.org Subject: Re: [RFA v2 2/2] Fix PR python/17386 - add __index__ method to gdb.Value References: <20160525134757.2D266F97D@oc7340732750.ibm.com> Date: Wed, 25 May 2016 08:03:51 -0600 In-Reply-To: <20160525134757.2D266F97D@oc7340732750.ibm.com> (Ulrich Weigand's message of "Wed, 25 May 2016 15:47:57 +0200 (CEST)") Message-ID: <87eg8qutdk.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) MIME-Version: 1.0 X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.215.116.141 authed with tom+tromey.com} 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 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 * 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 + + * python/py-value.c (value_object_as_number): Use correct spelling + of HAVE_LIBPYTHON2_4. + 2016-05-25 Bernhard Heckel * 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 = {