diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-19 08:24:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-19 08:24:10 +0000 |
commit | 4e4c159b5949c60bee18beb98d35c7cd43c8d412 (patch) | |
tree | 34f2db4769ba67c0907313fcdfdb6824722a6bee | |
parent | f8e3cd1230b1e03b3271072a8d5263f6097d6bbc (diff) | |
download | ruby-4e4c159b5949c60bee18beb98d35c7cd43c8d412.tar.gz ruby-4e4c159b5949c60bee18beb98d35c7cd43c8d412.tar.xz ruby-4e4c159b5949c60bee18beb98d35c7cd43c8d412.zip |
* include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 11 | ||||
-rw-r--r-- | include/ruby/defines.h | 12 |
3 files changed, 23 insertions, 8 deletions
@@ -1,3 +1,11 @@ +Mon Jan 19 17:25:17 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added. + +Mon Jan 19 17:24:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * vm_dump.c (vm_stack_dump_each): used only if debug mode. + Mon Jan 19 16:32:35 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (hash): added MurmurHash 2.0. diff --git a/configure.in b/configure.in index 264903ea3..6f5a33695 100644 --- a/configure.in +++ b/configure.in @@ -472,12 +472,11 @@ if test "$GCC" = yes; then void bar(void) __attribute__(($a("foo")));], [bar()], [rb_cv_gcc_function_alias=$a; break]) done]) - if test "$rb_cv_gcc_function_alias" = no; then - AC_DEFINE([RUBY_ALIAS_FUNCTION(old_prot, new_name, args)], - [VALUE old_prot {return new_name args;}]) - else - AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION(old_prot, new_name, args)], - [VALUE old_prot __attribute__(($rb_cv_gcc_function_alias(@%:@new_name)));]) + if test "$rb_cv_gcc_function_alias" != no; then + AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION2(type, prot, name, args)], + [type prot __attribute__(($rb_cv_gcc_function_alias(@%:@name)));]) + AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)], + [RUBY_ALIAS_FUNCTION2(void, prot, name, args)]) fi fi diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 0b870db13..97806b7d0 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) |