mrb_str_new_static(): zero copy string creation

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-04-28 02:47:22 +09:00
parent 160eb71338
commit 5c68195c88
5 changed files with 49 additions and 13 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ struct RString {
#define RSTRING_LEN(s) (RSTRING(s)->len)
#define RSTRING_CAPA(s) (RSTRING(s)->aux.capa)
#define RSTRING_END(s) (RSTRING(s)->ptr + RSTRING(s)->len)
#define MRB_STR_SHARED 256
#define MRB_STR_SHARED 1
#define MRB_STR_STATIC (1<<1)
void mrb_str_decref(mrb_state*, mrb_shared_string*);
void mrb_str_modify(mrb_state*, struct RString*);