From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org, Vivien Kraus <vivien@planete-kraus.eu>
Subject: Re: RFC: add a string-desc module
Date: Sat, 25 Mar 2023 12:56:25 +0100 [thread overview]
Message-ID: <9616005.K2JlShyGXD@nimes> (raw)
In-Reply-To: <d99d32b3b7f9e91185f6414df3fb25bdb0f75b9d.camel@planete-kraus.eu>
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
next prev parent reply other threads:[~2023-03-25 11:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 21:50 RFC: add a string-desc module Bruno Haible
2023-03-24 22:32 ` Paul Eggert
2023-03-25 11:39 ` Bruno Haible
2023-03-24 23:20 ` Jeffrey Walton
2023-03-25 6:25 ` Vivien Kraus
2023-03-25 11:49 ` Bruno Haible
2023-03-25 15:51 ` Paul Eggert
2023-03-28 22:40 ` Bruno Haible
2023-03-25 6:21 ` Vivien Kraus
2023-03-25 11:56 ` Bruno Haible [this message]
2023-03-27 10:15 ` Simon Josefsson via Gnulib discussion list
2023-03-28 22:49 ` Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9616005.K2JlShyGXD@nimes \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=vivien@planete-kraus.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).