From 49e685a0af54f3916542b4720da9b7e3f92e347d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 19 Jan 2009 08:24:10 +0000 Subject: * include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/defines.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 0b870db137..97806b7d0a 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -266,9 +266,17 @@ void rb_ia64_flushrs(void); #define RUBY_PLATFORM "unknown-unknown" #endif +#ifndef RUBY_ALIAS_FUNCTION2 +#define RUBY_ALIAS_FUNCTION2(type, prot, name, args) \ + type prot {return name args;} +#endif +#ifndef RUBY_ALIAS_FUNCTION_VOID +#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \ + void prot {name args;} +#endif #ifndef RUBY_ALIAS_FUNCTION -#define RUBY_ALIAS_FUNCTION(old_prot, new_name, args) \ - VALUE old_prot {return new_name args;} +#define RUBY_ALIAS_FUNCTION(prot, name, args) \ + RUBY_ALIAS_FUNCTION2(VALUE, prot, name, args) #endif #if defined(__cplusplus) -- cgit v1.2.3