summaryrefslogtreecommitdiffhomepage
path: root/src/print.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-07-17 23:50:19 +0900
committerYukihiro Matsumoto <[email protected]>2012-07-17 23:50:19 +0900
commit1cffba6ae10aec7e2433e673e1bb5ab075885418 (patch)
tree8de0f3500807fc1e9c3f09481c90f9e3f6ac20fa /src/print.c
parent36664174cb5f4150533f51b36b19491474023988 (diff)
downloadmruby-1cffba6ae10aec7e2433e673e1bb5ab075885418.tar.gz
mruby-1cffba6ae10aec7e2433e673e1bb5ab075885418.zip
use fwrite() instead of loop putc
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/print.c b/src/print.c
index e081989d2..e6805edbf 100644
--- a/src/print.c
+++ b/src/print.c
@@ -20,10 +20,7 @@ printstr(mrb_state *mrb, mrb_value obj)
str = mrb_str_ptr(obj);
s = str->ptr;
len = str->len;
- while (len--) {
- putc(*s, stdout);
- s++;
- }
+ fwrite(s, len, 1, stdout);
}
}