diff options
-rw-r--r-- | Lib/ruby/rubyhead.swg | 8 | ||||
-rw-r--r-- | Lib/ruby/rubytracking.swg | 8 | ||||
-rw-r--r-- | Source/Modules/ruby.cxx | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/Lib/ruby/rubyhead.swg b/Lib/ruby/rubyhead.swg index 9a0400eea..89d6f1466 100644 --- a/Lib/ruby/rubyhead.swg +++ b/Lib/ruby/rubyhead.swg @@ -114,14 +114,14 @@ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) -# define VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f)) -# define INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f)) +# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f)) +# define SWIG_RUBY_INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f)) #else # define PROTECTFUNC(f) (f) # define VALUEFUNC(f) (f) # define VOIDFUNC(f) (f) -# define VOID_ANYARGS_FUNC(f) (f) -# define INT_ANYARGS_FUNC(f) (f) +# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) (f) +# define SWIG_RUBY_INT_ANYARGS_FUNC(f) (f) #endif /* Don't use for expressions have side effect */ diff --git a/Lib/ruby/rubytracking.swg b/Lib/ruby/rubytracking.swg index 221a68193..1edcc5681 100644 --- a/Lib/ruby/rubytracking.swg +++ b/Lib/ruby/rubytracking.swg @@ -69,7 +69,9 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value); } - rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", VALUEFUNC(swig_ruby_trackings_count), VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL)); + rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", + VALUEFUNC(swig_ruby_trackings_count), + SWIG_RUBY_VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL)); } /* Add a Tracking from a C/C++ struct to a Ruby object */ @@ -124,7 +126,9 @@ static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_ } SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) { - st_foreach(swig_ruby_trackings, INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback), (st_data_t)meth); + st_foreach(swig_ruby_trackings, + SWIG_RUBY_INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback), + (st_data_t)meth); } #ifdef __cplusplus diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 01b75befa..fcbcb7a5c 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -2274,7 +2274,7 @@ public: if (CPlusPlus) { Insert(getfname, 0, "VALUEFUNC("); Append(getfname, ")"); - Insert(setfname, 0, (use_virtual_var) ? "VOID_ANYARGS_FUNC(" : "VALUEFUNC("); + Insert(setfname, 0, (use_virtual_var) ? "SWIG_RUBY_VOID_ANYARGS_FUNC(" : "VALUEFUNC("); Append(setfname, ")"); } |