diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-14 19:33:38 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-14 19:33:38 +0900 |
| commit | 9d0bbdb7f8b54631d639d3ed3038b6546ee4558d (patch) | |
| tree | 1691225bfb97439d7f73ac727b5aa0615085fce7 /include | |
| parent | 93e9174c57709e6867459c55fb88149234483c1d (diff) | |
| download | mruby-9d0bbdb7f8b54631d639d3ed3038b6546ee4558d.tar.gz mruby-9d0bbdb7f8b54631d639d3ed3038b6546ee4558d.zip | |
use size_t for string length C API
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby.h | 2 | ||||
| -rw-r--r-- | include/mruby/string.h | 4 |
2 files changed, 3 insertions, 3 deletions
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); |
