[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: add a string-desc module
From: |
Bruno Haible |
Subject: |
Re: RFC: add a string-desc module |
Date: |
Sat, 25 Mar 2023 12:56:25 +0100 |
Vivien Kraus wrote:
> I frequently use ad-hoc code for this, however in library code, in
> which xmalloc is not much used.
Good point. I'll need to duplicate the interface of the memory
allocating functions: one with 'x', that use xmalloc, and one without
'x', for use in libraries.
> I learn new gnulib things primarily from the manual. Do you plan to
> document it there?
Yes, sure. The reference documentation can stay in the .h file, but
and overview and general usage section belongs in the documentation.
> > /* Return a copy of string S, as a NUL-terminated C string. */
> > extern char * string_desc_c (string_desc_t s);
>
> Would it be appropriate to use the attribute module and mark this
> ATTRIBUTE_DEALLOC_FREE?
Good point, yes. Will do!
Thanks for your review and remarks.
Bruno