diff options
Diffstat (limited to 'gdb/python/py-xmethods.c')
-rw-r--r-- | gdb/python/py-xmethods.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c index d01488f..e061da2 100644 --- a/gdb/python/py-xmethods.c +++ b/gdb/python/py-xmethods.c @@ -464,9 +464,10 @@ gdbpy_get_xmethod_result_type (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); |