1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-26 04:04:49 +00:00

Update janet_getmethod to better match new get api.

This commit is contained in:
Calvin Rose
2019-12-09 18:45:05 -06:00
parent 8ecf359bbe
commit 8700a407ce
7 changed files with 13 additions and 17 deletions

View File

@@ -1058,8 +1058,7 @@ static const JanetMethod parser_methods[] = {
static int parserget(void *p, Janet key, Janet *out) {
(void) p;
if (!janet_checktype(key, JANET_KEYWORD)) return 0;
*out = janet_getmethod(janet_unwrap_keyword(key), parser_methods);
return !janet_checktype(*out, JANET_NIL);
return janet_getmethod(janet_unwrap_keyword(key), parser_methods, out);
}
static const JanetReg parse_cfuns[] = {