Added support to avoid swig director type mismatch errors
on embedded ruby. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9702 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3b2294bf2f
commit
b6a08f9ec7
1 changed files with 12 additions and 3 deletions
|
|
@ -99,15 +99,24 @@ static VALUE swig_runtime_data_type_pointer = Qnil;
|
|||
|
||||
|
||||
#ifdef RUBY_EMBEDDED
|
||||
|
||||
# define SWIG_INIT_STACK \
|
||||
if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
|
||||
++swig_virtual_calls;
|
||||
# define SWIG_RELEASE_STACK --swig_virtual_calls;
|
||||
static unsigned int swig_virtual_calls = 0;
|
||||
#else
|
||||
# define Ruby__DirectorTypeMismatchException(x) \
|
||||
rb_raise( rb_eTypeError, x ); return c_result;
|
||||
|
||||
static unsigned int swig_virtual_calls = 0;
|
||||
|
||||
#else /* normal non-embedded extension */
|
||||
|
||||
# define SWIG_INIT_STACK
|
||||
# define SWIG_RELEASE_STACK
|
||||
#endif
|
||||
# define Ruby_DirectorTypeMismatchException(x) \
|
||||
throw Swig::DirectorTypeMismatchException( x );
|
||||
|
||||
#endif /* RUBY_EMBEDDED */
|
||||
|
||||
|
||||
SWIGRUNTIME VALUE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue