aboutsummaryrefslogtreecommitdiffstats
path: root/README.EXT.ja
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-11 13:31:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-11 13:31:23 +0000
commitdb5265a82c221887faf0dfd0d04e47cf11a08e3a (patch)
treea8d54a47508d0e890f102faa4705ce73562f0941 /README.EXT.ja
parenta5d1da5d74560c812acb8db6242e389d2f27e368 (diff)
downloadruby-db5265a82c221887faf0dfd0d04e47cf11a08e3a.tar.gz
* parse.y (rb_check_id_cstr): new function to check if ID is
registered with NUL-terminated C string. * sprintf.c (rb_str_format): avoid inadvertent symbol creation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT.ja')
-rw-r--r--README.EXT.ja6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.EXT.ja b/README.EXT.ja
index 6b0cb11757..9ce9c586a1 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -500,12 +500,14 @@ IDとは変数名,メソッド名を表す整数です.Rubyの中では
rb_to_id(VALUE symbol)
rb_check_id(volatile VALUE *name)
+ rb_check_id_cstr(const char *name, long len, rb_encoding *enc)
もし引数がシンボルでも文字列でもなければ、to_strメソッドで文
-字列に変換しようとします.後者の関数はその変換結果を*nameに保
+字列に変換しようとします.第二の関数はその変換結果を*nameに保
存し,その名前が既知のシンボルでない場合は0を返します.この関
数が0以外を返した場合は*nameは常にシンボルか文字列であり、0を
-返した場合は常に文字列です.
+返した場合は常に文字列です.第三の関数はRubyの文字列ではなく
+NUL終端されたCの文字列を使います.
2.2.3 CからRubyのメソッドを呼び出す