use rb_str_subseq for tail string on write
commita72e6cd0dd3038ae2a1b5ef94780143f5ab041c0
authorSokolov Yura 'funny-falcon <funny.falcon@gmail.com>
Wed, 30 May 2012 13:56:55 +0000 (30 17:56 +0400)
committerEric Wong <normalperson@yhbt.net>
Wed, 30 May 2012 18:58:08 +0000 (30 11:58 -0700)
treed30334a958f52c80b88419c674416b4c727923b4
parent021eaddbfb41d82c0082657f60021bad52b3a6dc
use rb_str_subseq for tail string on write

Use rb_str_subseq for taking string's tail. rb_str_subseq do not allocate
additional memory in this case. And although it prevents from collecting
original string, it seems that tests wins both in performance and in memory
usage.

Use fallback to rb_str_substr on ruby1.8

Signed-off-by: Eric Wong <normalperson@yhbt.net>
ext/kgio/extconf.rb
ext/kgio/read_write.c