if (function != Py_None)
return function;
-
+
Py_DECREF (function);
}
result = PyObject_CallMethodObjArgs (printer, gdbpy_to_string_cst, NULL);
if (result)
{
- if (! gdbpy_is_string (result) && ! gdbpy_is_lazy_string (result)
+ if (! gdbpy_is_string (result) && ! gdbpy_is_lazy_string (result)
&& result != Py_None)
{
*out_value = convert_value_from_python (result);
print_stack_unless_memory_error (stream);
/* Set a flag so we can know whether we printed all the
available elements. */
- else
+ else
done_flag = 1;
break;
}
val_obj = value_to_value_object (value);
if (! val_obj)
goto done;
-
+
/* Find the constructor. */
printer = find_pretty_printer (val_obj);
Py_DECREF (val_obj);
/* Find a pretty-printer object for the varobj module. Returns a new
reference to the object if successful; returns NULL if not. VALUE
- is the value for which a printer tests to determine if it
+ is the value for which a printer tests to determine if it
can pretty-print the value. */
PyObject *
gdbpy_get_varobj_pretty_printer (struct value *value)
value = value_copy (value);
}
GDB_PY_HANDLE_EXCEPTION (except);
-
+
val_obj = value_to_value_object (value);
if (! val_obj)
return NULL;
value = value_object_to_value (val_obj);
if (! value)
{
- PyErr_SetString (PyExc_TypeError,
+ PyErr_SetString (PyExc_TypeError,
_("Argument must be a gdb.Value."));
return NULL;
}