Add ability to return rvalue reference values from value_ref
[deliverable/binutils-gdb.git] / gdb / python / py-xmethods.c
index 8a9bb9b1c96d0b34991a3e911bdaf8603459cc1c..d01488fc74430c187a2cd49ceca178455fb64841 100644 (file)
@@ -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);
This page took 0.027582 seconds and 4 git commands to generate.