mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
Clean up value_struct_elt_bitpos
value_struct_elt_bitpos is weird: it takes an in/out value parameter, and it takes an error string parameter. However, it only has a single caller, which never uses the "out" value. I think it was done this way to mimic value_struct_elt. However, value_struct_elt is pretty ugly and I don't think it's worth imitating. This patch cleans up value_struct_elt_bitpos a bit. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -1096,8 +1096,7 @@ valpy_getitem (PyObject *self, PyObject *key)
|
||||
res_val = value_struct_elt (&tmp, {}, field.get (), NULL,
|
||||
"struct/class/union");
|
||||
else if (bitpos >= 0)
|
||||
res_val = value_struct_elt_bitpos (&tmp, bitpos, field_type,
|
||||
"struct/class/union");
|
||||
res_val = value_struct_elt_bitpos (tmp, bitpos, field_type);
|
||||
else if (base_class_type != NULL)
|
||||
{
|
||||
struct type *val_type;
|
||||
|
||||
Reference in New Issue
Block a user