diff options
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r-- | gdb/python/py-value.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 6e29284aad1..4e8d93e15ab 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -122,7 +122,7 @@ convert_buffer_and_type_to_value (PyObject *obj, struct type *type) && PyObject_GetBuffer (obj, &py_buf, PyBUF_SIMPLE) == 0) { /* Got a buffer, py_buf, out of obj. Cause it to be released - when it goes out of scope. */ + when it goes out of scope. */ buffer_up.reset (&py_buf); } else @@ -161,7 +161,7 @@ valpy_new (PyTypeObject *subtype, PyObject *args, PyObject *kwargs) { type = type_object_to_type (type_obj); if (type == nullptr) - { + { PyErr_SetString (PyExc_TypeError, _("type argument must be a gdb.Type.")); return nullptr; @@ -252,18 +252,18 @@ valpy_referenced_value (PyObject *self, PyObject *args) self_val = ((value_object *) self)->value; switch (check_typedef (value_type (self_val))->code ()) - { - case TYPE_CODE_PTR: - res_val = value_ind (self_val); - break; - case TYPE_CODE_REF: - case TYPE_CODE_RVALUE_REF: - res_val = coerce_ref (self_val); - break; - default: - error(_("Trying to get the referenced value from a value which is " - "neither a pointer nor a reference.")); - } + { + case TYPE_CODE_PTR: + res_val = value_ind (self_val); + break; + case TYPE_CODE_REF: + case TYPE_CODE_RVALUE_REF: + res_val = coerce_ref (self_val); + break; + default: + error(_("Trying to get the referenced value from a value which is " + "neither a pointer nor a reference.")); + } result = value_to_value_object (res_val); } @@ -963,7 +963,7 @@ valpy_getitem (PyObject *self, PyObject *key) { PyErr_SetString (PyExc_AttributeError, _("gdb.Field object has no name and no " - "'bitpos' attribute.")); + "'bitpos' attribute.")); return NULL; } @@ -1001,10 +1001,10 @@ valpy_getitem (PyObject *self, PyObject *key) res_val = value_cast (lookup_pointer_type (base_class_type), tmp); else if (val_type->code () == TYPE_CODE_REF) res_val = value_cast (lookup_lvalue_reference_type (base_class_type), - tmp); + tmp); else if (val_type->code () == TYPE_CODE_RVALUE_REF) res_val = value_cast (lookup_rvalue_reference_type (base_class_type), - tmp); + tmp); else res_val = value_cast (base_class_type, tmp); } @@ -1856,7 +1856,7 @@ convert_value_from_python (PyObject *obj) if (PyErr_Occurred ()) { /* If the error was an overflow, we can try converting to - ULONGEST instead. */ + ULONGEST instead. */ if (PyErr_ExceptionMatches (PyExc_OverflowError)) { gdbpy_err_fetch fetched_error; |