From 673d9183cf7ea96cb695187ccbfac18b3fd16ec2 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 25 Dec 2013 10:30:48 +0900 Subject: avoid copying when the original string comes with MRB_STR_NOFREE --- include/mruby/string.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/mruby/string.h b/include/mruby/string.h index 594965134..c6d2e0e70 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -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); -- cgit v1.2.3