Minor cleanup. Mode RUBY_INIT_STACK macro
definition to rubyhead.swg where all the backward compatability macros are kept. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9715 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
57c6fd2f39
commit
57cca3c3cb
2 changed files with 14 additions and 12 deletions
|
|
@ -96,5 +96,14 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// For ruby1.8.4 and earlier.
|
||||||
|
#ifndef RUBY_INIT_STACK
|
||||||
|
extern void Init_stack(VALUE* addr);
|
||||||
|
# define RUBY_INIT_STACK \
|
||||||
|
VALUE variable_in_this_stack_frame; \
|
||||||
|
Init_stack(&variable_in_this_stack_frame);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Global module used to keep some internal SWIG stuff */
|
/* Global module used to keep some internal SWIG stuff */
|
||||||
static VALUE _mSWIG = Qnil;
|
static VALUE _mSWIG = Qnil;
|
||||||
|
|
|
||||||
|
|
@ -84,20 +84,13 @@ static VALUE swig_runtime_data_type_pointer = Qnil;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If your swig extension is to be run within an embedded ruby and has
|
If your swig extension is to be run within an embedded ruby and has
|
||||||
director callbacks, you should set RUBY_EMBEDDED. This will reset
|
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
|
||||||
ruby's stack frame on each entry point from the main program the first
|
This will reset ruby's stack frame on each entry point from the main
|
||||||
time a virtual director function is invoked (in a non-recursive way).
|
program the first time a virtual director function is invoked (in a
|
||||||
If this is not done, you run the risk of trashing the stack.
|
non-recursive way).
|
||||||
|
If this is not done, you run the risk of Ruby trashing the stack.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RUBY_INIT_STACK
|
|
||||||
extern void Init_stack(VALUE* addr);
|
|
||||||
# define RUBY_INIT_STACK \
|
|
||||||
VALUE variable_in_this_stack_frame; \
|
|
||||||
Init_stack(&variable_in_this_stack_frame);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef RUBY_EMBEDDED
|
#ifdef RUBY_EMBEDDED
|
||||||
|
|
||||||
# define SWIG_INIT_STACK \
|
# define SWIG_INIT_STACK \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue