mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add nd_type_p
macro
This commit is contained in:
parent
28fb6d6b9e
commit
ec7f14d9fa
Notes:
git
2021-12-04 00:01:53 +09:00
Merged: https://github.com/ruby/ruby/pull/5091 Merged-By: nobu <nobu@ruby-lang.org>
5 changed files with 102 additions and 101 deletions
1
node.h
1
node.h
|
@ -193,6 +193,7 @@ typedef struct RNode {
|
|||
#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
|
||||
|
||||
#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
|
||||
#define nd_type_p(n, t) (nd_type((n)) == (t))
|
||||
#define nd_set_type(n,t) \
|
||||
rb_node_set_type(n, t)
|
||||
#define nd_init_type(n,t) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue