diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-12-26 09:42:29 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-12-26 12:05:52 -0800 |
commit | 1a45e78b8759073c6f184039324d5b4bf8ef8f95 (patch) | |
tree | 0c5edd1fe88a5fac1e95d5a455fd0f5e9fa14a64 /src/search.h | |
parent | 1d5679ea305370430538e9c1284db736c8433503 (diff) | |
download | grep-1a45e78b8759073c6f184039324d5b4bf8ef8f95.tar.gz |
grep: minor performance tweak for pure functions
* src/search.h (wordchars_size, wordchar_next, wordchar_prev):
Declare to be pure.
Diffstat (limited to 'src/search.h')
-rw-r--r-- | src/search.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/search.h b/src/search.h index 469fc9c6..1aa2f949 100644 --- a/src/search.h +++ b/src/search.h @@ -48,9 +48,10 @@ typedef signed char mb_len_map_t; /* searchutils.c */ extern void wordinit (void); extern kwset_t kwsinit (bool); -extern size_t wordchars_size (char const *, char const *); -extern size_t wordchar_next (char const *, char const *); -extern size_t wordchar_prev (char const *, char const *, char const *); +extern size_t wordchars_size (char const *, char const *) _GL_ATTRIBUTE_PURE; +extern size_t wordchar_next (char const *, char const *) _GL_ATTRIBUTE_PURE; +extern size_t wordchar_prev (char const *, char const *, char const *) + _GL_ATTRIBUTE_PURE; extern ptrdiff_t mb_goback (char const **, char const *, char const *); /* dfasearch.c */ |