summaryrefslogtreecommitdiff
path: root/src/search.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-26 09:42:29 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-26 12:05:52 -0800
commit1a45e78b8759073c6f184039324d5b4bf8ef8f95 (patch)
tree0c5edd1fe88a5fac1e95d5a455fd0f5e9fa14a64 /src/search.h
parent1d5679ea305370430538e9c1284db736c8433503 (diff)
downloadgrep-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.h7
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 */