From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22786 invoked by alias); 4 Aug 2012 19:24:58 -0000 Received: (qmail 22778 invoked by uid 22791); 4 Aug 2012 19:24:57 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Aug 2012 19:24:40 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q74JOePK016922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 4 Aug 2012 15:24:40 -0400 Received: from spoyarek (vpn-237-183.phx2.redhat.com [10.3.237.183]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q74JOcWg017739 for ; Sat, 4 Aug 2012 15:24:39 -0400 Date: Sat, 04 Aug 2012 19:24:00 -0000 From: Siddhesh Poyarekar To: gdb-patches@sourceware.org Subject: [PATCH 3/3] bitpos: Minor python changes for bitpos expansion Message-ID: <20120805005417.6e8d34d9@spoyarek> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/VMl.7aksG2Z64jy=SO/It2U" 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: 2012-08/txt/msg00146.txt.bz2 --MP_/VMl.7aksG2Z64jy=SO/It2U Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 486 Hi, This is the final (and the smallest) patch in the bitpos expansion changes. This patch changes python-types code to use PyLong_FromLongLong for bitpos and type.length. I have verified that there are not regressions in the testsuite as a result of this patch. Regards, Siddhesh gdb/ChangeLog 2012-08-05 Siddhesh Poyarekar * python/py-type.c (convert_field): Use PyLong_FromLongLong for TYPE_FIELD_BITPOS. (typy_get_sizeof): Likewise for TYPE_LENGTH. --MP_/VMl.7aksG2Z64jy=SO/It2U Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-expand-python.patch Content-length: 618 diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 98030a6..afb8b72 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -176,7 +176,7 @@ convert_field (struct type *type, int field) } else { - arg = PyLong_FromLong (TYPE_FIELD_BITPOS (type, field)); + arg = PyLong_FromLongLong (TYPE_FIELD_BITPOS (type, field)); attrstring = "bitpos"; } @@ -683,7 +683,7 @@ typy_get_sizeof (PyObject *self, void *closure) } /* Ignore exceptions. */ - return PyLong_FromLong (TYPE_LENGTH (type)); + return PyLong_FromLongLong (TYPE_LENGTH (type)); } static struct type * --MP_/VMl.7aksG2Z64jy=SO/It2U--