diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-23 03:46:52 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-23 03:46:52 -0700 |
| commit | af2f3dd16f0d322a4d878196c1b8565cc264d625 (patch) | |
| tree | 7138d6d52cf84e65fe32c98d1b092dd9431305d9 /include | |
| parent | fe7472852255f3b265eaa32cd59e869b9528ece6 (diff) | |
| parent | 0cedf8fa02848bc505d7cda29f7266b5e03a9076 (diff) | |
| download | mruby-af2f3dd16f0d322a4d878196c1b8565cc264d625.tar.gz mruby-af2f3dd16f0d322a4d878196c1b8565cc264d625.zip | |
Merge pull request #1050 from monaka/pr-cleanup-string.c-20130323
Clean up string.c
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/string.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h index 613c6c6a7..3dc4094aa 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -56,7 +56,7 @@ char *mrb_string_value_ptr(mrb_state *mrb, mrb_value ptr); int mrb_str_offset(mrb_state *mrb, mrb_value str, int pos); mrb_value mrb_str_dup(mrb_state *mrb, mrb_value str); /* mrb_str_dup */ mrb_value mrb_str_intern(mrb_state *mrb, mrb_value self); -mrb_value mrb_str_cat2(mrb_state *mrb, mrb_value str, const char *ptr); +mrb_value mrb_str_cat_cstr(mrb_state *, mrb_value, const char *); mrb_value mrb_str_to_inum(mrb_state *mrb, mrb_value str, int base, int badcheck); double mrb_str_to_dbl(mrb_state *mrb, mrb_value str, int badcheck); mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str); @@ -71,6 +71,12 @@ mrb_value mrb_str_append(mrb_state *mrb, mrb_value str, mrb_value str2); int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2); char *mrb_str_to_cstr(mrb_state *mrb, mrb_value str); +/* For backward compatibility */ +static inline mrb_value +mrb_str_cat2(mrb_state *mrb, mrb_value str, const char *ptr) { + return mrb_str_cat_cstr(mrb, str, ptr); +} + #if defined(__cplusplus) } /* extern "C" { */ #endif |
