From d7cf0285e21b40c1fba6259d57bdabae94571bd5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 14 Jan 2010 11:08:38 +0100 Subject: [PATCH] odr_malloc,odr_total uses size_t --- include/yaz/odr.h | 4 ++-- src/odr_mem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/yaz/odr.h b/include/yaz/odr.h index ac554fc..b8d45cf 100644 --- a/include/yaz/odr.h +++ b/include/yaz/odr.h @@ -184,7 +184,7 @@ YAZ_EXPORT void odr_reset(ODR o); YAZ_EXPORT void odr_destroy(ODR o); YAZ_EXPORT void odr_setbuf(ODR o, char *buf, int len, int can_grow); YAZ_EXPORT char *odr_getbuf(ODR o, int *len, int *size); -YAZ_EXPORT void *odr_malloc(ODR o, int size); +YAZ_EXPORT void *odr_malloc(ODR o, size_t size); YAZ_EXPORT char *odr_strdup(ODR o, const char *str); YAZ_EXPORT char *odr_strdupn(ODR o, const char *str, size_t n); YAZ_EXPORT char *odr_strdup_null(ODR o, const char *str); @@ -289,7 +289,7 @@ YAZ_EXPORT int odr_seek(ODR o, int whence, int offset); YAZ_EXPORT int odr_dumpBER(FILE *f, const char *buf, int len); YAZ_EXPORT void odr_choice_bias(ODR o, int what); YAZ_EXPORT void odr_choice_enable_bias(ODR o, int mode); -YAZ_EXPORT int odr_total(ODR o); +YAZ_EXPORT size_t odr_total(ODR o); YAZ_EXPORT char *odr_errmsg(int n); YAZ_EXPORT Odr_oid *odr_getoidbystr(ODR o, const char *str); YAZ_EXPORT Odr_oid *odr_getoidbystr_nmem(NMEM o, const char *str); diff --git a/src/odr_mem.c b/src/odr_mem.c index 555c443..e65af9e 100644 --- a/src/odr_mem.c +++ b/src/odr_mem.c @@ -27,7 +27,7 @@ NMEM odr_extract_mem(ODR o) return r; } -void *odr_malloc(ODR o, int size) +void *odr_malloc(ODR o, size_t size) { return nmem_malloc(o->mem, size); } @@ -57,7 +57,7 @@ Odr_bool *odr_booldup(ODR o, Odr_bool v) return nmem_booldup(o->mem, v); } -int odr_total(ODR o) +size_t odr_total(ODR o) { return nmem_total(o->mem); } -- 1.7.10.4