From a53921b3696439692eb50a0a5378ee90dfbef013 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Thu, 18 Apr 2024 19:45:19 -0300 Subject: [PATCH] fix: Fix another windows warning --- src/core/compile.c | 5 ++--- src/core/compile.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/compile.c b/src/core/compile.c index 2d9a3ebb..8d6613cb 100644 --- a/src/core/compile.c +++ b/src/core/compile.c @@ -418,12 +418,11 @@ JanetSlot janetc_gettarget(JanetFopts opts) { } /* Get a bunch of slots for function arguments */ -JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, int32_t len) { - int32_t i; +JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, size_t len) { JanetSlot *ret = NULL; JanetFopts subopts = janetc_fopts_default(c); 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])); } return ret; diff --git a/src/core/compile.h b/src/core/compile.h index 05e6f39b..e372fb9f 100644 --- a/src/core/compile.h +++ b/src/core/compile.h @@ -232,7 +232,7 @@ void janetc_throwaway(JanetFopts opts, Janet x); JanetSlot janetc_gettarget(JanetFopts opts); /* 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 */ JanetSlot *janetc_toslotskv(JanetCompiler *c, Janet ds);