diff options
Diffstat (limited to 'gdb/python/python-internal.h')
| -rw-r--r-- | gdb/python/python-internal.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 1f0964f24d3..fdd353ffbeb 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -1191,14 +1191,13 @@ public: } /* Lookup pre-existing Python object for given VAL. Return such object - if found, otherwise return NULL. This method always returns new - reference. */ + if found, otherwise return NULL. */ template <typename O> - obj_type *lookup (O *owner, val_type *val) const + gdbpy_ref<> lookup (O *owner, val_type *val) const { obj_type *obj = get_storage (owner)->lookup (val); Py_XINCREF (static_cast<PyObject *> (obj)); - return obj; + return gdbpy_ref<> (obj); } private: |
