mirror of
https://github.com/janet-lang/janet
synced 2024-11-10 10:49:54 +00:00
Fix arity typo in peg
This commit is contained in:
parent
772f4c26e8
commit
938f5a689e
@ -1652,7 +1652,7 @@ typedef struct {
|
|||||||
static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
|
static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
|
||||||
PegCall ret;
|
PegCall ret;
|
||||||
int32_t min = get_replace ? 3 : 2;
|
int32_t min = get_replace ? 3 : 2;
|
||||||
janet_arity(argc, get_replace, -1);
|
janet_arity(argc, min, -1);
|
||||||
if (janet_checktype(argv[0], JANET_ABSTRACT) &&
|
if (janet_checktype(argv[0], JANET_ABSTRACT) &&
|
||||||
janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
|
janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
|
||||||
ret.peg = janet_unwrap_abstract(argv[0]);
|
ret.peg = janet_unwrap_abstract(argv[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user