diff options
| author | ksss <[email protected]> | 2014-03-02 11:04:04 +0000 |
|---|---|---|
| committer | ksss <[email protected]> | 2014-03-06 13:12:08 +0000 |
| commit | 4070b5987a76a2d633a99e137035749559e2da59 (patch) | |
| tree | 0a753936d9fc52112b1e9c8f2e623a0542afc298 /mrbgems/mruby-sprintf | |
| parent | e40428af7b02870663a6c052496c176c22c5e875 (diff) | |
| download | mruby-4070b5987a76a2d633a99e137035749559e2da59.tar.gz mruby-4070b5987a76a2d633a99e137035749559e2da59.zip | |
embed small string
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
Diffstat (limited to 'mrbgems/mruby-sprintf')
| -rw-r--r-- | mrbgems/mruby-sprintf/src/sprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index ff9627437..785068999 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -712,7 +712,7 @@ retry: if (*p == 'p') arg = mrb_inspect(mrb, arg); str = mrb_obj_as_string(mrb, arg); len = RSTRING_LEN(str); - RSTRING_LEN(result) = blen; + RSTRING(result)->as.heap.len = blen; if (flags&(FPREC|FWIDTH)) { slen = RSTRING_LEN(str); if (slen < 0) { |
