Turn value_fetch_lazy into a method

This changes value_fetch_lazy to be a method of value.  A few helper
functions are converted as well, to avoid problems in later patches
when the data members are all made private.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 13:53:55 -07:00
parent bbe912ba88
commit 78259c365f
16 changed files with 98 additions and 88 deletions

View File

@ -579,7 +579,7 @@ gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang,
enum gdbpy_string_repr_result print_result;
if (value->lazy ())
value_fetch_lazy (value);
value->fetch_lazy ();
/* No pretty-printer support for unavailable values. */
if (!value_bytes_available (value, 0, type->length ()))

View File

@ -1241,7 +1241,7 @@ valpy_fetch_lazy (PyObject *self, PyObject *args)
try
{
if (value->lazy ())
value_fetch_lazy (value);
value->fetch_lazy ();
}
catch (const gdb_exception &except)
{