diff options
Diffstat (limited to 'README.EXT')
-rw-r--r-- | README.EXT | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/README.EXT b/README.EXT index ad45255bca..8368a94708 100644 --- a/README.EXT +++ b/README.EXT @@ -452,12 +452,14 @@ argument by using rb_to_id(VALUE symbol) rb_check_id(volatile VALUE *name) + rb_check_id_cstr(const char *name, long len, rb_encoding *enc) These functions try to convert the argument to a String if it was not -a Symbol nor a String. The latter function stores the converted +a Symbol nor a String. The second function stores the converted result into *name, and returns 0 if the string is not a known symbol. After this function returned a non-zero value, *name is always a Symbol or a String, otherwise it is a String if the result is 0. +The third function takes NUL-terminated C string, not Ruby VALUE. You can convert C ID to Ruby Symbol by using |