aboutsummaryrefslogtreecommitdiffstats
path: root/README.EXT
diff options
context:
space:
mode:
Diffstat (limited to 'README.EXT')
-rw-r--r--README.EXT10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.EXT b/README.EXT
index 756f46f98b..bfea6001c2 100644
--- a/README.EXT
+++ b/README.EXT
@@ -482,6 +482,16 @@ 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 retrieve Symbol from Ruby object (Symbol or String) given as
+an argument by using
+
+ rb_to_symbol(VALUE name)
+ rb_check_symbol(volatile VALUE *namep)
+ rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc)
+
+These functions are similar to above functions except that these
+return a Symbol instead of an ID.
+
You can convert C ID to Ruby Symbol by using
VALUE ID2SYM(ID id)