mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
avoid copying when the original string comes with MRB_STR_NOFREE
This commit is contained in:
@@ -32,6 +32,9 @@ struct RString {
|
||||
#define RSTRING_CAPA(s) (RSTRING(s)->aux.capa)
|
||||
#define RSTRING_END(s) (RSTRING(s)->ptr + RSTRING(s)->len)
|
||||
|
||||
#define MRB_STR_SHARED 1
|
||||
#define MRB_STR_NOFREE 2
|
||||
|
||||
void mrb_gc_free_str(mrb_state*, struct RString*);
|
||||
void mrb_str_modify(mrb_state*, struct RString*);
|
||||
mrb_value mrb_str_literal(mrb_state*, mrb_value);
|
||||
|
||||
Reference in New Issue
Block a user