bug-gnulib
[Top][All Lists]
Advanced

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

Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher


From: arnold
Subject: Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher
Date: Thu, 12 Dec 2019 00:31:06 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hi Paul.

Paul Eggert <address@hidden> wrote:

> https://lists.gnu.org/r/bug-gnulib/2019-12/msg00058.html
> https://lists.gnu.org/r/bug-gnulib/2019-12/msg00059.html

Looking at this:

| @@ -1733,11 +1733,11 @@ add_utf8_anychar (struct dfa *dfa)
|      /* f0-f7: 4-byte sequence.  */
|      CHARCLASS_INIT (0, 0, 0, 0, 0, 0, 0, 0xff0000)
|    };
| -  const unsigned int n = sizeof (utf8_classes) / sizeof (utf8_classes[0]);
| +  int n = sizeof utf8_classes / sizeof *utf8_classes;

Why are you throwing away const here?

Other than this, I think internally too, I'd prefer that you

        1,$s/ptrdiff_t/ssize_t/g

(and fix any printf calls).  It just feels like an abuse of
the type, which is for representing differences between pointers,
and not regular large signed integeers.

However, I'm not going to insist about it internally, whereas
I would object strongly to the use of ptrdiff_t in the API.

Thanks!

Arnold



reply via email to

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