mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* template/id.h.tmpl, id.h (ruby_method_ids_check): enclosed in a
struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									934525776f
								
							
						
					
					
						commit
						b8db90f35a
					
				
					 3 changed files with 10 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -115,11 +115,13 @@ enum ruby_method_ids {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
#ifdef tLAST_TOKEN
 | 
			
		||||
struct ruby_method_ids_check {
 | 
			
		||||
#define ruby_method_id_check_for(name, value) \
 | 
			
		||||
    typedef int ruby_method_id_check_for_##name[name == value ? 1 : -1]
 | 
			
		||||
    int checking_for_##name[name == value ? 1 : -1]
 | 
			
		||||
% tokens.map do |token, value|
 | 
			
		||||
ruby_method_id_check_for(<%=token%>, <%=value%>);
 | 
			
		||||
% end
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* RUBY_ID_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue