[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] maint: ensure that MB_CUR_MAX is defined even when !MBS_
Re: [PATCH 1/5] maint: ensure that MB_CUR_MAX is defined even when !MBS_SUPPORT
Fri, 16 Sep 2011 13:03:57 GMT
> What about changing this patch to a sweeping s/MB_CUR_MAX/GREP_MB_MAX/g
> and doing
> #define GREP_MB_MAX (MBS_SUPPORT ? MB_CUR_MAX : 1)
Please remember that dfa.[ch] are shared code with gawk and I think
also gettext (although I don't know how up to date gettext's version is).
I'd really prefer not to have too many GREP_xxx kinds of things in those
files. (It's ok in the rest of grep, of course. :-)
For what it's worth, MB_CUR_MAX is a function call in GLIBC. There were
some cases in gawk where I was losing a noticable amount of time calling
it a lot. So I set up a global variable gawk_mb_cur_max and initialize
it in main(), since the result should never change during a single run of
the program. It made a difference.
Hope this helps.
- Re: [PATCH 1/5] maint: ensure that MB_CUR_MAX is defined even when !MBS_SUPPORT,