MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / lookup_arg_cache

Function lookup_arg_cache

extern/btyacc/reader.c:1142–1151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140 } *arg_cache[ARG_CACHE_SIZE];
1141
1142static int lookup_arg_cache(char *code)
1143{
1144struct arg_cache *entry;
1145
1146 entry = arg_cache[strnshash(code) % ARG_CACHE_SIZE];
1147 while (entry) {
1148 if (!strnscmp(entry->code, code)) return entry->rule;
1149 entry = entry->next; }
1150 return -1;
1151}
1152
1153static void insert_arg_cache(char *code, int rule)
1154{

Callers 1

insert_arg_ruleFunction · 0.85

Calls 2

strnshashFunction · 0.85
strnscmpFunction · 0.85

Tested by

no test coverage detected