Permalink
Browse files

use fwrite() instead of loop putc

  • Loading branch information...
1 parent 3666417 commit 1cffba6ae10aec7e2433e673e1bb5ab075885418 @matz matz committed Jul 17, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/print.c
View
5 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);
}
}

0 comments on commit 1cffba6

Please sign in to comment.