diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-25 10:30:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-25 10:30:48 +0900 |
| commit | 673d9183cf7ea96cb695187ccbfac18b3fd16ec2 (patch) | |
| tree | e99328d50c6d020984d962e5d0c9557e2387dee6 /include | |
| parent | 9b7b18aaf4e02601eb86303b3ce25daf9565892f (diff) | |
| download | mruby-673d9183cf7ea96cb695187ccbfac18b3fd16ec2.tar.gz mruby-673d9183cf7ea96cb695187ccbfac18b3fd16ec2.zip | |
avoid copying when the original string comes with MRB_STR_NOFREE
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/string.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |
