From 6cfbe51c87e21950fafbf01b7402894a32814b08 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 18 Nov 2013 01:07:51 +0900 Subject: [PATCH] pic_get_args: change type of argc --- src/error.c | 3 ++- src/number.c | 3 ++- src/vm.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/error.c b/src/error.c index e104d753..224d9cd8 100644 --- a/src/error.c +++ b/src/error.c @@ -121,7 +121,8 @@ static pic_value pic_error_error(pic_state *pic) { char *str; - int len, argc; + int len; + size_t argc; pic_value *argv; struct pic_error *e; diff --git a/src/number.c b/src/number.c index 841372cf..b5ac9c21 100644 --- a/src/number.c +++ b/src/number.c @@ -83,8 +83,9 @@ pic_number_nan_p(pic_state *pic) static pic_value \ pic_number_##name(pic_state *pic) \ { \ - int argc, i; \ + size_t argc; \ pic_value *argv; \ + int i; \ double f,g; \ \ pic_get_args(pic, "ff*", &f, &g, &argc, &argv); \ diff --git a/src/vm.c b/src/vm.c index 720cf119..c8ef10a9 100644 --- a/src/vm.c +++ b/src/vm.c @@ -246,10 +246,10 @@ pic_get_args(pic_state *pic, const char *format, ...) } } if ('*' == c) { - int *n; + size_t *n; pic_value **argv; - n = va_arg(ap, int *); + n = va_arg(ap, size_t *); argv = va_arg(ap, pic_value **); if (i <= argc) { *n = argc - i;