Add nd_type_p macro

This commit is contained in:
S.H 2021-12-04 00:01:24 +09:00 committed by GitHub
parent 28fb6d6b9e
commit ec7f14d9fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
View file

@ -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) \