1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-21 03:39:36 +00:00

fix: Fix another windows warning

This commit is contained in:
GrayJack 2024-04-18 19:45:19 -03:00
parent 6eb371e076
commit a53921b369
2 changed files with 3 additions and 4 deletions

View File

@ -418,12 +418,11 @@ JanetSlot janetc_gettarget(JanetFopts opts) {
} }
/* Get a bunch of slots for function arguments */ /* Get a bunch of slots for function arguments */
JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, int32_t len) { JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, size_t len) {
int32_t i;
JanetSlot *ret = NULL; JanetSlot *ret = NULL;
JanetFopts subopts = janetc_fopts_default(c); JanetFopts subopts = janetc_fopts_default(c);
subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE; subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
for (i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
janet_v_push(ret, janetc_value(subopts, vals[i])); janet_v_push(ret, janetc_value(subopts, vals[i]));
} }
return ret; return ret;

View File

@ -232,7 +232,7 @@ void janetc_throwaway(JanetFopts opts, Janet x);
JanetSlot janetc_gettarget(JanetFopts opts); JanetSlot janetc_gettarget(JanetFopts opts);
/* Get a bunch of slots for function arguments */ /* Get a bunch of slots for function arguments */
JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, int32_t len); JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, size_t len);
/* Get a bunch of slots for function arguments */ /* Get a bunch of slots for function arguments */
JanetSlot *janetc_toslotskv(JanetCompiler *c, Janet ds); JanetSlot *janetc_toslotskv(JanetCompiler *c, Janet ds);