ruby-changes:10121
From: nobu <ko1@a...>
Date: Mon, 19 Jan 2009 17:24:47 +0900 (JST)
Subject: [ruby-changes:10121] Ruby:r21665 (trunk): * include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added.
nobu 2009-01-19 17:24:10 +0900 (Mon, 19 Jan 2009) New Revision: 21665 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21665 Log: * include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added. Modified files: trunk/ChangeLog trunk/configure.in trunk/include/ruby/defines.h Index: include/ruby/defines.h =================================================================== --- include/ruby/defines.h (revision 21664) +++ include/ruby/defines.h (revision 21665) @@ -266,9 +266,17 @@ #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) Index: configure.in =================================================================== --- configure.in (revision 21664) +++ configure.in (revision 21665) @@ -472,12 +472,11 @@ 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 Index: ChangeLog =================================================================== --- ChangeLog (revision 21664) +++ ChangeLog (revision 21665) @@ -1,3 +1,11 @@ +Mon Jan 19 17:25:17 2009 Nobuyoshi Nakada <nobu@r...> + + * include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added. + +Mon Jan 19 17:24:05 2009 Nobuyoshi Nakada <nobu@r...> + + * vm_dump.c (vm_stack_dump_each): used only if debug mode. + Mon Jan 19 16:32:35 2009 Nobuyoshi Nakada <nobu@r...> * string.c (hash): added MurmurHash 2.0. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/