зеркало из https://github.com/github/ruby.git
* ext/stringio/stringio.c (strio_truncate): should MEMZERO an extended
part. [ruby-dev:25618] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9b6581dc47
Коммит
729249159e
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,8 @@
|
|||
Wed Feb 2 23:52:53 2005 sheepman <sheepman@tcn.zaq.ne.jp>
|
||||
|
||||
* ext/stringio/stringio.c (strio_truncate): should MEMZERO an extended
|
||||
part. [ruby-dev:25618]
|
||||
|
||||
Wed Feb 2 21:56:01 2005 Kouhei Sutou <kou@cozmixng.org>
|
||||
|
||||
* lib/rss/rss.rb (RSS::Element#convert): added.
|
||||
|
@ -5,11 +10,11 @@ Wed Feb 2 21:56:01 2005 Kouhei Sutou <kou@cozmixng.org>
|
|||
* lib/rss/rss.rb: convert -> need_convert.
|
||||
|
||||
* lib/rss/1.0.rb: ditto.
|
||||
|
||||
|
||||
* lib/rss/0.9.rb: ditto.
|
||||
|
||||
|
||||
* lib/rss/2.0.rb: ditto.
|
||||
|
||||
|
||||
* lib/rss/trackback.rb: ditto.
|
||||
|
||||
Wed Feb 2 03:30:58 2005 Minero Aoki <aamine@loveruby.net>
|
||||
|
|
|
@ -934,10 +934,14 @@ strio_truncate(self, len)
|
|||
{
|
||||
VALUE string = writable(StringIO(self))->string;
|
||||
long l = NUM2LONG(len);
|
||||
long plen = RSTRING(string)->len;
|
||||
if (l < 0) {
|
||||
error_inval("negative legnth");
|
||||
}
|
||||
rb_str_resize(string, l);
|
||||
if (plen < l) {
|
||||
MEMZERO(RSTRING(string)->ptr + plen, char, l - plen);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче