From 9d0bbdb7f8b54631d639d3ed3038b6546ee4558d Mon Sep 17 00:00:00 2001 From: Yukihiro Matz Matsumoto Date: Thu, 14 Mar 2013 19:33:38 +0900 Subject: use size_t for string length C API --- include/mruby.h | 2 +- include/mruby/string.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mruby.h b/include/mruby.h index 6d7be7616..018a6a678 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -202,7 +202,7 @@ void *mrb_realloc(mrb_state*, void*, size_t); struct RBasic *mrb_obj_alloc(mrb_state*, enum mrb_vtype, struct RClass*); void *mrb_free(mrb_state*, void*); -mrb_value mrb_str_new(mrb_state *mrb, const char *p, int len); /* mrb_str_new */ +mrb_value mrb_str_new(mrb_state *mrb, const char *p, size_t len); mrb_value mrb_str_new_cstr(mrb_state*, const char*); mrb_state* mrb_open(void); diff --git a/include/mruby/string.h b/include/mruby/string.h index 2fc748474..613c6c6a7 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -46,10 +46,10 @@ mrb_value mrb_str_plus(mrb_state*, mrb_value, mrb_value); mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj); mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, int len); /* mrb_str_resize */ mrb_value mrb_string_value(mrb_state *mrb, mrb_value *ptr); /* StringValue */ -mrb_value mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, int len); +mrb_value mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len); mrb_value mrb_check_string_type(mrb_state *mrb, mrb_value str); mrb_value mrb_str_buf_new(mrb_state *mrb, int capa); -mrb_value mrb_str_buf_cat(mrb_state *mrb, mrb_value str, const char *ptr, int len); +mrb_value mrb_str_buf_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len); char *mrb_string_value_cstr(mrb_state *mrb, mrb_value *ptr); char *mrb_string_value_ptr(mrb_state *mrb, mrb_value ptr); -- cgit v1.2.3