This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH v3] Introduce gdb::unique_ptr
>>>>> "Pedro" == Pedro Alves <firstname.lastname@example.org> writes:
Pedro> For managing malloc pointers, this adds a gdb::unique_malloc_ptr<T>
Pedro> "specialization" with a custom xfree deleter.
I found something surprising while using this patch: it can't be used in
a .y file, due to the malloc->xmalloc renaming done in the .y.c rule.
I puzzled over the error about "unique_xmalloc_ptr" for a while until I
One option would be to fix up that renaming, maybe something like:
- -e 's/\([^x]\)malloc/\1xmalloc/g' \
- -e 's/\([^x_]\)malloc/\1xmalloc/g' \
Another would be to rename the class unique_xmalloc_ptr after all.