diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-17 23:28:19 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-17 23:28:19 -0800 |
| commit | c577769a89614d41aa58cca9076fd85f727085a6 (patch) | |
| tree | 4079257369c39a55d0a89475bcf5d7aa73d1ebab /definitions.h | |
| parent | 379bf1b6c8632d7aa7215b1ef880a89794531ff5 (diff) | |
Updated REF and CAPTURE types to store direct pointers to names (with a
len size_t) instead of allocating memory.
Diffstat (limited to 'definitions.h')
| -rw-r--r-- | definitions.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/definitions.h b/definitions.h index 8c3ae87..6017b59 100644 --- a/definitions.h +++ b/definitions.h @@ -9,12 +9,12 @@ __attribute__((nonnull(3,4), returns_nonnull)) def_t *with_def(def_t *defs, size_t namelen, const char *name, pat_t *pat); -__attribute__((nonnull(2,3,4), returns_nonnull)) -def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m); +__attribute__((nonnull(2,4,5), returns_nonnull)) +def_t *with_backref(def_t *defs, file_t *f, size_t namelen, const char *name, match_t *m); __attribute__((nonnull(2))) def_t *load_grammar(def_t *defs, file_t *f); -__attribute__((pure, nonnull(2))) -def_t *lookup(def_t *defs, const char *name); +__attribute__((pure, nonnull(3))) +def_t *lookup(def_t *defs, size_t namelen, const char *name); __attribute__((nonnull(1))) void free_defs(def_t **defs, def_t *stop); |
