+2002-01-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * valops.c (find_overload_match): Accept obj as a
+ reference parameter. Update it before returning.
+ * value.h (find_overload_match): Update prototype.
+ * eval.c (evaluate_subexp_standard): Pass object to
+ find_overload_match by reference.
+
2002-01-03 Andrew Cagney <ac131313@redhat.com>
* valarith.c: Replace value_ptr with struct value pointer. Remove
(void) find_overload_match (arg_types, nargs, tstr,
1 /* method */ , 0 /* strict match */ ,
- arg2 /* the object */ , NULL,
+ &arg2 /* the object */ , NULL,
&valp, NULL, &static_memfuncp);
int
find_overload_match (struct type **arg_types, int nargs, char *name, int method,
- int lax, struct value *obj, struct symbol *fsym,
+ int lax, struct value **objp, struct symbol *fsym,
struct value **valp, struct symbol **symp, int *staticp)
{
int nparms;
struct type **parm_types;
int champ_nparms = 0;
+ struct value *obj = (objp ? *objp : NULL);
short oload_champ = -1; /* Index of best overloaded function */
short oload_ambiguous = 0; /* Current ambiguity state for overload resolution */
xfree (func_name);
}
+ if (objp)
+ {
+ if (TYPE_CODE (VALUE_TYPE (temp)) != TYPE_CODE_PTR
+ && TYPE_CODE (VALUE_TYPE (*objp)) == TYPE_CODE_PTR)
+ {
+ temp = value_addr (temp);
+ }
+ *objp = temp;
+ }
return oload_incompatible ? 100 : (oload_non_standard ? 10 : 0);
}
extern int find_overload_match (struct type **arg_types, int nargs,
char *name, int method, int lax,
- struct value *obj, struct symbol *fsym,
+ struct value **objp, struct symbol *fsym,
struct value **valp, struct symbol **symp,
int *staticp);