mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Turn nd_type_p into an inline function
This commit is contained in:
		
							parent
							
								
									f41b4d44f9
								
							
						
					
					
						commit
						d118e7c025
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		
							
								
								
									
										6
									
								
								node.h
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								node.h
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -193,7 +193,6 @@ 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) \
 | 
			
		||||
| 
						 | 
				
			
			@ -498,6 +497,11 @@ rb_node_set_type(NODE *n, enum node_type t)
 | 
			
		|||
    return nd_init_type(n, t);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static inline bool
 | 
			
		||||
nd_type_p(const NODE *n, enum node_type t)
 | 
			
		||||
{
 | 
			
		||||
    return (enum node_type)nd_type(n) == t;
 | 
			
		||||
}
 | 
			
		||||
#if defined(__cplusplus)
 | 
			
		||||
#if 0
 | 
			
		||||
{ /* satisfy cc-mode */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue