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:
Gonzalo Garramuno 2007-04-29 22:56:18 +00:00
commit 57cca3c3cb
2 changed files with 14 additions and 12 deletions

View file

@ -96,5 +96,14 @@
#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 */
static VALUE _mSWIG = Qnil;

View file

@ -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
director callbacks, you should set RUBY_EMBEDDED. This will reset
ruby's stack frame on each entry point from the main program the first
time a virtual director function is invoked (in a non-recursive way).
If this is not done, you run the risk of trashing the stack.
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
This will reset ruby's stack frame on each entry point from the main
program the first time a virtual director function is invoked (in a
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
# define SWIG_INIT_STACK \