From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Matching regex case-sensitively in C strings? Date: Tue, 08 Nov 2022 21:37:49 +0200 Message-ID: <838rklxmnm.fsf@gnu.org> References: <218795BA-107D-4A86-9ACF-0A44BD2EC3D2@gmail.com> <83edufyoad.fsf@gnu.org> <580E87E6-DCFD-42AE-807A-339BBB3878C2@acm.org> <5711A9D3-7BCB-44AE-8911-5E039FF5FBB8@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37068"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 08 20:38:31 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osUQZ-0009OZ-31 for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Nov 2022 20:38:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osUQ7-0002k6-DR; Tue, 08 Nov 2022 14:38:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osUQ4-0002jh-So for emacs-devel@gnu.org; Tue, 08 Nov 2022 14:38:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osUQ4-0004en-G1; Tue, 08 Nov 2022 14:38:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=c7mT/xFDv7YHzWz59V/b+BJhW28+i0OiYEMCLx8fQK0=; b=obEwRQzcRMvR Nt5djT3GnkmikfQ4LeVSJ859796NbaB5rI6dbQL1yziiM7Du2GB6UBj3gubrvxrbXaVXIWW2RXe0i FknBx/8y6eL+R46C3gNFaDdPAWqgNQPwTs+sS2tyq2acUcnvRie8au3BtP6xaxz+AW3x32CcjhsJX m7VxE2K4jpa2VBoVMmmIp3XUqTsKHgXaWVRnKPmQAxbTsxSrBqO47aHcEgoQkzNJguhOIQxM+t9c7 cj0aa7gs+7X6yV5xmkdfCEHSLZ+azM6S8loHf+scM9WtXpBnkumd5d1mP2wevhY5xEILJYTygmy1N KIQgwAPLKmeqTObnaAWUPw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osUQ4-0008GT-4M; Tue, 08 Nov 2022 14:38:00 -0500 In-Reply-To: <5711A9D3-7BCB-44AE-8911-5E039FF5FBB8@gmail.com> (message from Yuan Fu on Tue, 8 Nov 2022 11:31:35 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299362 Archived-At: > From: Yuan Fu > Date: Tue, 8 Nov 2022 11:31:35 -0800 > Cc: Eli Zaretskii , > emacs-devel > > + Lisp_Object translate_table = ignore_case ? Vascii_canon_table : Qnil; Please don't call this "translate_table", as it isn't. The documentation elsewhere calls this "canonicalize_table" or just "canonicalize". > fast_c_string_match_ignore_case (Lisp_Object regexp, > const char *string, ptrdiff_t len) > { > + return fast_c_string_match (regexp, string, len, true); > +} I'm bothered that this function, which is supposed to be fast, will now be slower due to an extra function call.