diff options
author | S.H <[email protected]> | 2021-12-04 00:01:24 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-04 00:01:24 +0900 |
commit | ec7f14d9fab82b097fb8b58501461cd0e19d6bdf (patch) | |
tree | d09084edaf19af87c78cf8ed37d2cfe960b40e0a /node.h | |
parent | 28fb6d6b9e06a632f96244a635a045622a6be276 (diff) |
Add `nd_type_p` macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5091
Merged-By: nobu <[email protected]>
Diffstat (limited to 'node.h')
-rw-r--r-- | node.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) \ |