summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-print
diff options
context:
space:
mode:
authorksss <[email protected]>2014-03-02 11:04:04 +0000
committerksss <[email protected]>2014-03-06 13:12:08 +0000
commit4070b5987a76a2d633a99e137035749559e2da59 (patch)
tree0a753936d9fc52112b1e9c8f2e623a0542afc298 /mrbgems/mruby-print
parente40428af7b02870663a6c052496c176c22c5e875 (diff)
downloadmruby-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-print')
-rw-r--r--mrbgems/mruby-print/src/print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-print/src/print.c b/mrbgems/mruby-print/src/print.c
index 788b924f0..0cdbad6d4 100644
--- a/mrbgems/mruby-print/src/print.c
+++ b/mrbgems/mruby-print/src/print.c
@@ -11,8 +11,8 @@ printstr(mrb_state *mrb, mrb_value obj)
if (mrb_string_p(obj)) {
str = mrb_str_ptr(obj);
- s = str->ptr;
- len = str->len;
+ s = str->as.heap.ptr;
+ len = str->as.heap.len;
fwrite(s, len, 1, stdout);
}
}