From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31418 invoked by alias); 22 Dec 2008 16:24:19 -0000 Received: (qmail 31410 invoked by uid 22791); 22 Dec 2008 16:24:18 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Dec 2008 16:23:27 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBMGNPFF006400 for ; Mon, 22 Dec 2008 11:23:25 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBMGNOu2029091; Mon, 22 Dec 2008 11:23:25 -0500 Received: from opsy.redhat.com (vpn-12-2.rdu.redhat.com [10.11.12.2]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mBMGNJ5l025731; Mon, 22 Dec 2008 11:23:20 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 23252378623; Mon, 22 Dec 2008 09:23:18 -0700 (MST) To: gdb-patches@sourceware.org Subject: RFA: a small python-value.c normalization From: Tom Tromey Reply-To: Tom Tromey Date: Mon, 22 Dec 2008 16:24:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00383.txt.bz2 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 * 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. */