From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CD5701F4B4 for ; Sat, 17 Oct 2020 01:07:43 +0000 (UTC) Received: from localhost ([::1]:48690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTahC-0005rY-VS for normalperson@yhbt.net; Fri, 16 Oct 2020 21:07:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTah7-0005rM-Dj for bug-gnulib@gnu.org; Fri, 16 Oct 2020 21:07:37 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:35870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTah4-0007kT-Q4 for bug-gnulib@gnu.org; Fri, 16 Oct 2020 21:07:36 -0400 Received: by mail-wm1-f51.google.com with SMTP id e2so5078545wme.1 for ; Fri, 16 Oct 2020 18:07:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aZgZ6fev4kQNVX7mjRb5Nx2ocgZ8iIp7ay674KDKPh4=; b=QLGuLNfaZmKC198MF+HKgxB7G/4c++tHD1QYOKYrmj6qMZJfmpv3fa0kiqPnDkyHtt GQnaANDmJP7YJ6lF19e1A4OefAmhV0qYVxiwSfSW1dKABtljDkrN5lCdTj1tzASLqcHT zOHqZWNA4hOL/Pq+Ak2TLKi1rmea5EZ/lbmn2qng1RU+CxohoGeEgmfeGfazKef3W0+w tUu2b+qB93924OHhdSuG1ojZGjXWYu+CD5k8C4hyObZ4a+upfN7/vbBwPl6LVU5rtiKN KWCjKGtPd83cGDor1VxDaNfq+nFOyjk1l8vxWUAW/YFA8MIo7uyDHt8ZGmCKcew3ZL02 TIgA== X-Gm-Message-State: AOAM533GnRAtVJMMBntyzaqQLbPPJGouaGq8Kxf4e3sR4YQV1IYdImNG /ILgr5tJoN9X1vqUF6jPk7wNW0rWjhGJEBxofEo= X-Google-Smtp-Source: ABdhPJxBaUST4P8hjMoMnxEA/jDsraBU/s94oqbTXgt8qYvP/iXmXzdqGqXqOMSPulq3c1ufaVY+iMAM+JLHhSWX6j0= X-Received: by 2002:a7b:cf26:: with SMTP id m6mr6166999wmg.71.1602896852809; Fri, 16 Oct 2020 18:07:32 -0700 (PDT) MIME-Version: 1.0 References: <20035228.V94roVDRE2@omega> In-Reply-To: <20035228.V94roVDRE2@omega> From: Jim Meyering Date: Fri, 16 Oct 2020 18:07:20 -0700 Message-ID: Subject: Re: hash, xhash: modernize To: Bruno Haible Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.128.51; envelope-from=meyering@gmail.com; helo=mail-wm1-f51.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/16 21:07:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "bug-gnulib@gnu.org List" Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" [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 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 > > 2) regarding C++ interoperability, > 3) regarding terminology ("delete" vs. "remove") > > > Here are proposed patches to modernize the 'hash' and 'xhash' modules in > this respect. > > Objections? > > Bruno > > > 2020-10-11 Bruno Haible > > 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 > > hash, xhash: Make usable from C++. > * lib/hash.h: Add extern "C". > > 2020-10-11 Bruno Haible > > 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. > >