diff options
Diffstat (limited to 'match.c')
| -rw-r--r-- | match.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -33,6 +33,7 @@ static match_t *unused_matches = NULL; static match_t *in_use_matches = NULL; #endif +static match_t *new_match(void); __attribute__((nonnull, pure)) static inline const char *next_char(file_t *f, const char *str); __attribute__((nonnull)) @@ -41,6 +42,8 @@ __attribute__((nonnull)) static match_t *get_capture_by_num(match_t *m, int *n); __attribute__((nonnull, pure)) static match_t *get_capture_by_name(match_t *m, const char *name); +__attribute__((hot, nonnull(2,3,4))) +static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, unsigned int flags); // // Return the location of the next character or UTF8 codepoint. @@ -144,7 +147,7 @@ match_t *next_match(def_t *defs, file_t *f, match_t *prev, pat_t *pat, unsigned // match object, or NULL if no match is found. // The returned value should be free()'d to avoid memory leaking. // -match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, unsigned int ignorecase) +static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, unsigned int ignorecase) { switch (pat->type) { case BP_LEFTRECURSION: { @@ -574,7 +577,7 @@ match_t *get_capture(match_t *m, const char **id) // // Return a match object which can be used (may be allocated or recycled). // -match_t *new_match(void) +static match_t *new_match(void) { match_t *m; |
