From a43e3248e8047c2fa3b283203f97b688601225cf Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 1 Dec 2013 12:44:43 +0900 Subject: [PATCH] calloc should take size_t --- include/picrin.h | 2 +- src/gc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/picrin.h b/include/picrin.h index c69b2d46..ba688f02 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -86,7 +86,7 @@ enum pic_parser_res { void *pic_alloc(pic_state *, size_t); void *pic_realloc(pic_state *, void *, size_t); -void *pic_calloc(pic_state *, unsigned, size_t); +void *pic_calloc(pic_state *, size_t, size_t); struct pic_object *pic_obj_alloc(pic_state *, size_t, enum pic_tt); struct pic_object *pic_obj_alloc_unsafe(pic_state *, size_t, enum pic_tt); void pic_free(pic_state *, void *); diff --git a/src/gc.c b/src/gc.c index 1ddd6f43..faab9e70 100644 --- a/src/gc.c +++ b/src/gc.c @@ -61,7 +61,7 @@ pic_realloc(pic_state *pic, void *ptr, size_t size) } void * -pic_calloc(pic_state *pic, unsigned count, size_t size) +pic_calloc(pic_state *pic, size_t count, size_t size) { void *ptr;