aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-xmethods.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-xmethods.c')
-rw-r--r--gdb/python/py-xmethods.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 8a9bb9b..d01488f 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -552,9 +552,10 @@ gdbpy_invoke_xmethod (const struct extension_language_defn *extlang,
if (!types_equal (obj_type, this_ptr))
obj = value_cast (this_ptr, obj);
}
- else if (TYPE_CODE (obj_type) == TYPE_CODE_REF)
+ else if (TYPE_IS_REFERENCE (obj_type))
{
- struct type *this_ref = lookup_lvalue_reference_type (this_type);
+ struct type *this_ref
+ = lookup_reference_type (this_type, TYPE_CODE (obj_type));
if (!types_equal (obj_type, this_ref))
obj = value_cast (this_ref, obj);