Merge branch 'master' of github.com:ancurio/mkxp
This commit is contained in:
		
						commit
						646786ef93
					
				
					 12 changed files with 72 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -67,7 +67,7 @@ raiseRbExc(const Exception &exc);
 | 
			
		|||
 | 
			
		||||
/* 2.1 has added a new field (flags) to rb_data_type_t */
 | 
			
		||||
#include <ruby/version.h>
 | 
			
		||||
#if RUBY_API_VERSION_MINOR > 0
 | 
			
		||||
#if RUBY_API_VERSION_MAJOR >= 2 && RUBY_API_VERSION_MINOR >= 1
 | 
			
		||||
/* TODO: can mkxp use RUBY_TYPED_FREE_IMMEDIATELY here? */
 | 
			
		||||
#define DEF_TYPE_FLAGS 0
 | 
			
		||||
#else
 | 
			
		||||
| 
						 | 
				
			
			@ -90,7 +90,12 @@ raiseRbExc(const Exception &exc);
 | 
			
		|||
template<rb_data_type_t *rbType>
 | 
			
		||||
static VALUE classAllocate(VALUE klass)
 | 
			
		||||
{
 | 
			
		||||
/* 2.3 has changed the name of this function */
 | 
			
		||||
#if RUBY_API_VERSION_MAJOR >= 2 && RUBY_API_VERSION_MINOR >= 3
 | 
			
		||||
	return rb_data_typed_object_wrap(klass, 0, rbType);
 | 
			
		||||
#else
 | 
			
		||||
	return rb_data_typed_object_alloc(klass, 0, rbType);
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template<class C>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue