Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/3] bitpos: Minor python changes for bitpos expansion
Date: Sat, 04 Aug 2012 19:24:00 -0000	[thread overview]
Message-ID: <20120805005417.6e8d34d9@spoyarek> (raw)

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

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  <siddhesh@redhat.com>

	* python/py-type.c (convert_field): Use PyLong_FromLongLong for
	TYPE_FIELD_BITPOS.
	(typy_get_sizeof): Likewise for TYPE_LENGTH.

[-- Attachment #2: bitpos-expand-python.patch --]
[-- Type: text/x-patch, Size: 618 bytes --]

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 *

             reply	other threads:[~2012-08-04 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 19:24 Siddhesh Poyarekar [this message]
2012-08-10 16:59 ` Tom Tromey
2012-08-10 18:58   ` Siddhesh Poyarekar
2012-08-10 20:42     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120805005417.6e8d34d9@spoyarek \
    --to=siddhesh@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox