This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 0/3] More cleanup elimination / gdb::unique_ptr
>>>>> "Pedro" == Pedro Alves <firstname.lastname@example.org> writes:
Pedro> But I'll be happy to drop my patch instead if you'd prefer.
No, please keep it.
>> but note mine deletes the do_cleanups, which you don't want to do.
Pedro> Looks like the last cleanup is this one:
Pedro> name = xstrdup (TYPE_FIELD_NAME (type, 0));
Pedro> cleanup = make_cleanup (xfree, name);
Pedro> tail = name + strlen (RUST_ENUM_PREFIX);
Pedro> and, I can't figure out why we need to xstrdup at all here?
The string is modified using strtok_r below.