bug-grep
[Top][All Lists]
Advanced

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

bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c


From: Jim Meyering
Subject: bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c
Date: Fri, 19 Aug 2016 09:37:54 -0700

On Thu, Aug 18, 2016 at 7:46 AM, Jim Meyering <address@hidden> wrote:
> On Thu, Aug 18, 2016 at 3:50 AM, Zev Weiss <address@hidden> wrote:
>> * src/dfa.c: remove global dfa struct.  A pointer to a struct dfa is
>> instead added as a parameter to the functions that had been using the
>> global.
>
> Thank you.
> At first glance, I like it, but saw no "const" attribute on any added
> parameter declaration.
> Surely some of those can be "const".  Would you make all new dfa
> parameters const that can be?

Hi Zev,

I went ahead and did that for you.
There were only two: using_simple_locale and nsubtoks.
I amended your patch to make those "dfa" parameters "const"
and adjusted the commit message to conform to our standards:

  - use active voice, not passive
  - enumerate each affected variable/function

Yes, it is tedious, but for a project as mature as grep, it is
essential. You would not believe the number of times that having the
ability to cross-check the prose of a ChangeLog entry with the actual
change has led to pre-commit improvements.

Now, since I've changed a commit in your name that I expect to push,
it is your job to proof-read it to make sure you're still happy to
have your name on this modified commit. We treat our git repository as
write-once. No non-fast-forward pushes on master, so once pushed, it's
there forever. Let me know.

Attachment: dfa-remove-file-scoped-global.diff
Description: Text document


reply via email to

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