ruby-changes:14451
From: naruse <ko1@a...>
Date: Mon, 11 Jan 2010 16:59:50 +0900 (JST)
Subject: [ruby-changes:14451] Ruby:r26282 (trunk): * string.c (rb_str_strlen): added.
naruse 2010-01-11 16:58:26 +0900 (Mon, 11 Jan 2010) New Revision: 26282 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26282 Log: * string.c (rb_str_strlen): added. [ruby-dev:40028] * include/ruby/intern.h (rb_str_strlen): declared. Modified files: trunk/ChangeLog trunk/include/ruby/intern.h trunk/string.c Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 26281) +++ include/ruby/intern.h (revision 26282) @@ -662,6 +662,7 @@ void rb_str_setter(VALUE, ID, VALUE*); VALUE rb_str_intern(VALUE); VALUE rb_sym_to_s(VALUE); +long rb_str_strlen(VALUE); VALUE rb_str_length(VALUE); long rb_str_offset(VALUE, long); size_t rb_str_capacity(VALUE); Index: ChangeLog =================================================================== --- ChangeLog (revision 26281) +++ ChangeLog (revision 26282) @@ -1,3 +1,9 @@ +Mon Jan 11 16:52:05 2010 NARUSE, Yui <naruse@r...> + + * string.c (rb_str_strlen): added. [ruby-dev:40028] + + * include/ruby/intern.h (rb_str_strlen): declared. + Mon Jan 11 13:30:35 2010 Nobuyoshi Nakada <nobu@r...> * lib/webrick/accesslog.rb (WEBrick::AccessLog#format): fixed typo. Index: string.c =================================================================== --- string.c (revision 26281) +++ string.c (revision 26282) @@ -1079,6 +1079,12 @@ return n; } +long +rb_str_strlen(VALUE str) +{ + return str_strlen(str, STR_ENC_GET(str)); +} + /* * call-seq: * str.length => integer -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/