bug-gnulib
[Top][All Lists]
Advanced

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

Re: acl, copy-file: First step towards more consistent function names


From: Pádraig Brady
Subject: Re: acl, copy-file: First step towards more consistent function names
Date: Sun, 25 Aug 2024 09:08:56 +0100
User-agent: Mozilla Thunderbird Beta

On 24/08/2024 17:49, Bruno Haible wrote:
In most Gnulib modules, when we have a function that does something
and another function that does the same thing with diagnostics, the
common convention is that the latter has an 'x' prefix. Such as for
   malloc — xalloc
   vasprintf — xvasprintf
   getcwd — xgetcwd
   striconv — xstriconv
   etc.

The modules 'acl' and 'copy-file' use an opposite convention:
   qcopy_acl — copy_acl

This is so for historical reasons: the function which emits diagnostics
was there before the silent function.

In the name of consistency of the API, I'd like to migrate 'acl' and 'copy-file'
to the common conventions: In a first step
   qcopy_acl — xcopy_acl

and then later (in a year or two):
   copy_acl — xcopy_acl

At some point, we can then also rename the modules accordingly.

I always thought the x...() variants indicate they might eXit().

Are there any other x...() variants that just output a diagnostic,
and don't exit()?

thanks,
Pádraig



reply via email to

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