summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-17 18:20:22 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-17 18:20:22 (GMT)
commit4e48b6428034b92c4eb23e1d50889979f8a38dfb (patch)
tree1728c1e18387a97577452e46fe8eb24119eb2b9d /symbol.c
parentaed7a09aea58ea20e4c2ff785416b756bc2a88c6 (diff)
symbol.c: symbol type predicate functions
* symbol.h (is_{local,global,instance,attrset,const,class,junk}_sym): fix ID type names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/symbol.c b/symbol.c
index 8bfe95e..a22a1d1 100644
--- a/symbol.c
+++ b/symbol.c
@@ -889,6 +889,48 @@ rb_is_junk_id(ID id)
return is_junk_id(id);
}
+int
+rb_is_const_sym(VALUE sym)
+{
+ return is_const_sym(sym);
+}
+
+int
+rb_is_class_sym(VALUE sym)
+{
+ return is_class_sym(sym);
+}
+
+int
+rb_is_global_sym(VALUE sym)
+{
+ return is_global_sym(sym);
+}
+
+int
+rb_is_instance_sym(VALUE sym)
+{
+ return is_instance_sym(sym);
+}
+
+int
+rb_is_attrset_sym(VALUE sym)
+{
+ return is_attrset_sym(sym);
+}
+
+int
+rb_is_local_sym(VALUE sym)
+{
+ return is_local_sym(sym);
+}
+
+int
+rb_is_junk_sym(VALUE sym)
+{
+ return is_junk_sym(sym);
+}
+
/**
* Returns ID for the given name if it is interned already, or 0.
*