* python/python.c (gdbpy_solib_name): Use gdb_py_longest and
[deliverable/binutils-gdb.git] / gdb / python / py-symtab.c
index 6c805b72b2ae8f8efab9b1f6338df503df04acab..95dda5ddc9aa81ec98382f5f6bd8b118a59bb5f1 100644 (file)
@@ -1,6 +1,6 @@
 /* Python interface to symbol tables.
 
-   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -186,7 +186,7 @@ salpy_get_pc (PyObject *self, void *closure)
 
   SALPY_REQUIRE_VALID (self, sal);
 
-  return PyLong_FromUnsignedLongLong (sal->pc);
+  return gdb_py_long_from_ulongest (sal->pc);
 }
 
 static PyObject *
@@ -196,7 +196,7 @@ salpy_get_line (PyObject *self, void *closure)
 
   SALPY_REQUIRE_VALID (self, sal);
 
-  return PyLong_FromUnsignedLongLong (sal->line);
+  return PyInt_FromLong (sal->line);
 }
 
 static PyObject *
@@ -322,8 +322,8 @@ symtab_and_line_to_sal_object (struct symtab_and_line sal)
 {
   sal_object *sal_obj;
   int success = 0;
-  sal_obj = PyObject_New (sal_object, &sal_object_type);
 
+  sal_obj = PyObject_New (sal_object, &sal_object_type);
   if (sal_obj)
     {
       success = set_sal (sal_obj, sal);
@@ -365,6 +365,7 @@ static void
 del_objfile_symtab (struct objfile *objfile, void *datum)
 {
   symtab_object *obj = datum;
+
   while (obj)
     {
       symtab_object *next = obj->next;
@@ -385,6 +386,7 @@ static void
 del_objfile_sal (struct objfile *objfile, void *datum)
 {
   sal_object *obj = datum;
+
   while (obj)
     {
       sal_object *next = obj->next;
This page took 0.025243 seconds and 4 git commands to generate.