This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 07/17] malloc: Add specialized dynarray for C strings
On 14/06/2017 10:35, Florian Weimer wrote:
> Adhemerval Zanella <firstname.lastname@example.org> writes:
>>>> +++ b/malloc/char_array.c
>>> Should this be malloc/char_array-skeleton.c, to indicate that this file
>>> is parameterized and intended for inclusion into another .c file?
>> I am not sure, the idea of char_array is to be self-contained, there is
>> no need to define anything in the file to include it. Also, if we see
>> other usage of dynamic C string inside glibc it would be a good idea to
>> add internal symbols for common symbols.
> But it's still necessary to #include the file because it is what the C++
> people call a header-only library. And there is a hook for customizing
> the size of the stack allocation. This is why I asked. I don't have a
> strong opinion on file naming, though.
Fair enough then, although if this kind of usage pattern for dynarray
become common it would be interesting to move to internal symbol. I will
change to char_array-skeleton.c.