Return gdbpy_ref from gdb_py_object_from_*longest
[deliverable/binutils-gdb.git] / gdb / python / py-linetable.c
index c4e80d02a55197d745c20991d26341ea7048ec88..97c81aacf0c990212e7a416c3ef2433c511b9309 100644 (file)
@@ -244,7 +244,7 @@ ltpy_get_all_source_lines (PyObject *self, PyObject *args)
         include in the source set. */
       if (item->line > 0)
        {
-         gdbpy_ref<> line (gdb_py_object_from_longest (item->line));
+         gdbpy_ref<> line = gdb_py_object_from_longest (item->line);
 
          if (line == NULL)
            return NULL;
@@ -327,7 +327,7 @@ ltpy_entry_get_line (PyObject *self, void *closure)
 {
   linetable_entry_object *obj = (linetable_entry_object *) self;
 
-  return gdb_py_object_from_longest (obj->line);
+  return gdb_py_object_from_longest (obj->line).release ();
 }
 
 /* Implementation of gdb.LineTableEntry.pc (self) -> Long.  Returns a
@@ -338,7 +338,7 @@ ltpy_entry_get_pc (PyObject *self, void *closure)
 {
   linetable_entry_object *obj = (linetable_entry_object *) self;
 
-  return  gdb_py_object_from_longest (obj->pc);
+  return  gdb_py_object_from_longest (obj->pc).release ();
 }
 
 /* LineTable iterator functions.  */
This page took 0.023975 seconds and 4 git commands to generate.