let's just use ((void *)-1) as another invalid pointer result
This commit is contained in:
parent
90b6f30fa1
commit
8995097a1d
3 changed files with 5 additions and 6 deletions
|
|
@ -349,7 +349,7 @@ void *h_stringmap_get(const HStringMap *m, const uint8_t *str, size_t n, bool en
|
|||
return m->epsilon_branch;
|
||||
}
|
||||
|
||||
// A NULL result means no parse. H_NEED_INPUT means lookahead is too short.
|
||||
// A NULL result means no parse. NEED_INPUT means lookahead is too short.
|
||||
void *h_stringmap_get_lookahead(const HStringMap *m, HInputStream lookahead)
|
||||
{
|
||||
while(m) {
|
||||
|
|
@ -368,7 +368,7 @@ void *h_stringmap_get_lookahead(const HStringMap *m, HInputStream lookahead)
|
|||
// XXX assumption of byte-wise grammar and input
|
||||
return m->end_branch;
|
||||
} else {
|
||||
return H_NEED_INPUT;
|
||||
return NEED_INPUT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue