bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Typo in quote.h


From: Bruno Haible
Subject: Re: Typo in quote.h
Date: Sun, 01 Nov 2020 22:19:31 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote:
> On 11/1/20 4:07 AM, Bruno Haible wrote:
> > I like the idea. Yes, moving the struct to a "quotearg-private.h" would
> > not accidentally reveal the details to the user who reads quotearg.h.
> 
> Sounds good to me too. This way, we wouldn't need the QUOTING_OPTIONS_INIT 
> macro.

?? I don't understand. We need the QUOTING_OPTIONS_INIT macro because
different modules want to allocate their 'struct quoting_options' objects
statically. Being forced to call clone_quoting_options at runtime is a bit
of an annoyance.

But yes, we could hide the macro QUOTING_OPTIONS_INIT in "quotearg-private.h"
and, in quotearg.h, only reveal its existence, not its expansion.

> And renaming quotearg_n_options wouldn't be a big deal, since it could be 
> in quotearg-private.h.

?? The point of the exercise is that quotearg_n_options becomes a public API,
so that application code as well as the Gnulib 'quote' module can use it.
There is no good reason to hide this function - it is more powerful but just
as easy to use as quotearg_n_style_mem and quotearg_n_custom_mem.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]