summaryrefslogtreecommitdiff
path: root/Lib/ruby
diff options
context:
space:
mode:
authorThomas Reitmayr <treitmayr@devbase.at>2020-01-03 21:45:53 +0100
committerThomas Reitmayr <treitmayr@devbase.at>2020-01-03 21:45:53 +0100
commit5542cc228ad10bdc5c91107afb77c808c43bf2a4 (patch)
treee4f3bc691b50501b2fef3f6c700de97df2c975f3 /Lib/ruby
parent00e291b319bd6b58bf061feee3721a58c9c6be32 (diff)
downloadswig-5542cc228ad10bdc5c91107afb77c808c43bf2a4.tar.gz
Move new macros for Ruby to their dedicated namespace
Diffstat (limited to 'Lib/ruby')
-rw-r--r--Lib/ruby/rubyhead.swg8
-rw-r--r--Lib/ruby/rubytracking.swg8
2 files changed, 10 insertions, 6 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