bug-gnulib
[Top][All Lists]
Advanced

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

Re: hash, xhash: modernize


From: Jim Meyering
Subject: Re: hash, xhash: modernize
Date: Fri, 16 Oct 2020 18:07:20 -0700

[I wrote this two or so days ago, but see now somehow I failed to send it]
On Sun, Oct 11, 2020 at 2:58 PM Bruno Haible <bruno@clisp.org> wrote:
> It has been reported today that looking at the 'hash' module made Marc guess
> incorrectly what is desired coding style and terminology in Gnulib.

I do not desire to standardize on the coding style suggested by these
diffs, so perhaps you should say "desired by some".

I tried to make it clear the last time we discussed this (long ago!)
that I prefer to keep certain comments very near the function
definition (and implementation).

I disagree with the premise that hash_delete should be renamed. That's
an API-breaking change.


> 1) regarding where to documented exported functions of a module
>    <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00050.html>
> 2) regarding C++ interoperability,
> 3) regarding terminology ("delete" vs. "remove")
>    <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00091.html>
>
> Here are proposed patches to modernize the 'hash' and 'xhash' modules in
> this respect.
>
> Objections?
>
> Bruno
>
>
> 2020-10-11  Bruno Haible  <bruno@clisp.org>
>
>         hash: Rename hash_delete to hash_remove.
>         * lib/hash.h (hash_remove): Renamed from hash_delete.
>         (hash_delete): New declaration.
>         * lib/hash.c (hash_remove): Renamed from hash_delete.
>         (hash_delete): New function.
>         * tests/test-hash.c (main): Update.
>         * lib/fts-cycle.c (leave_dir): Likewise.
>         * NEWS: Mention the change.
>
> 2020-10-11  Bruno Haible  <bruno@clisp.org>
>
>         hash, xhash: Make usable from C++.
>         * lib/hash.h: Add extern "C".
>
> 2020-10-11  Bruno Haible  <bruno@clisp.org>
>
>         hash, xhash: Move comments to the .h file.
>         * lib/hash.c: Move comments meant for the user from here...
>         * lib/xhash.c: ... and here...
>         * lib/hash.h: ... to here.
>
>



reply via email to

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