Commit 2040347d authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1650 from cremno/remove-str_mod_check

string.c: remove str_mod_check
parents ee8875b1 84e9c4be
...@@ -107,16 +107,6 @@ mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len) ...@@ -107,16 +107,6 @@ mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len)
return str; return str;
} }
static inline void
str_mod_check(mrb_state *mrb, mrb_value str, char *p, mrb_int len)
{
struct RString *s = mrb_str_ptr(str);
if (s->ptr != p || s->len != len) {
mrb_raise(mrb, E_RUNTIME_ERROR, "string modified");
}
}
#define mrb_obj_alloc_string(mrb) ((struct RString*)mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class)) #define mrb_obj_alloc_string(mrb) ((struct RString*)mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
/* char offset to byte offset */ /* char offset to byte offset */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment