[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hash, xhash: modernize
From: |
Bruno Haible |
Subject: |
hash, xhash: modernize |
Date: |
Sun, 11 Oct 2020 23:58:29 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
It has been reported today that looking at the 'hash' module made Marc guess
incorrectly what is desired coding style and terminology in Gnulib.
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.
0001-hash-xhash-Move-comments-to-the-.h-file.patch
Description: Text Data
0002-hash-xhash-Make-usable-from-C.patch
Description: Text Data
0003-hash-Rename-hash_delete-to-hash_remove.patch
Description: Text Data
- hash, xhash: modernize,
Bruno Haible <=