emacs-devel
[Top][All Lists]
Advanced

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

Re: Matching regex case-sensitively in C strings?


From: Yuan Fu
Subject: Re: Matching regex case-sensitively in C strings?
Date: Tue, 8 Nov 2022 12:59:12 -0800


> On Nov 8, 2022, at 11:37 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Tue, 8 Nov 2022 11:31:35 -0800
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> emacs-devel <emacs-devel@gnu.org>
>> 
>> +  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.

How about this:

Now c_string_match functions mirror their string_match counterparts.

Yuan

Attachment: c_string_match.diff
Description: Binary data


reply via email to

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