... and move comment to header file.
gdb/ChangeLog:
* valops.c (value_must_coerce_to_target): Change return type to
bool.
* value.h (value_must_coerce_to_target): Likewise.
+2019-07-10 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * valops.c (value_must_coerce_to_target): Change return type to
+ bool.
+ * value.h (value_must_coerce_to_target): Likewise.
+
2019-07-10 Simon Marchi <simon.marchi@efficios.com>
* breakpoint.c (is_hardware_watchpoint): Remove
return val;
}
-/* Return one if VAL does not live in target memory, but should in order
- to operate on it. Otherwise return zero. */
+/* See value.h. */
-int
+bool
value_must_coerce_to_target (struct value *val)
{
struct type *valtype;
if (VALUE_LVAL (val) != not_lval
&& VALUE_LVAL (val) != lval_internalvar
&& VALUE_LVAL (val) != lval_xcallable)
- return 0;
+ return false;
valtype = check_typedef (value_type (val));
case TYPE_CODE_ARRAY:
return TYPE_VECTOR (valtype) ? 0 : 1;
case TYPE_CODE_STRING:
- return 1;
+ return true;
default:
- return 0;
+ return false;
}
}
extern LONGEST value_ptrdiff (struct value *arg1, struct value *arg2);
-extern int value_must_coerce_to_target (struct value *arg1);
+/* Return true if VAL does not live in target memory, but should in order
+ to operate on it. Otherwise return false. */
+
+extern bool value_must_coerce_to_target (struct value *arg1);
extern struct value *value_coerce_to_target (struct value *arg1);