mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
gdb/python: replace strlen call with std::string::size call
Small cleanup to use std::string::size instead of calling strlen on the result of std::string::c_str. Should be no user visible changes after this call.
This commit is contained in:
@ -612,7 +612,7 @@ disasmpy_result_string (PyObject *self, void *closure)
|
||||
disasm_result_object *obj = (disasm_result_object *) self;
|
||||
|
||||
gdb_assert (obj->content != nullptr);
|
||||
gdb_assert (strlen (obj->content->c_str ()) > 0);
|
||||
gdb_assert (obj->content->size () > 0);
|
||||
gdb_assert (obj->length > 0);
|
||||
return PyUnicode_Decode (obj->content->c_str (),
|
||||
obj->content->size (),
|
||||
|
Reference in New Issue
Block a user