From 4496da18a81b828fed293b1ab6645b6fac9be67d Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Dec 2007 07:04:30 +0000 Subject: * trunk/common.mk, goruby.c, golf_prelude.rb: for golfers. * trunk/main.c (main): hook for embedding applications. * trunk/tool/compile_prelude.rb: can change initialize function name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/compile_prelude.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tool') diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb index 60d56fba64..2ffccc0d93 100644 --- a/tool/compile_prelude.rb +++ b/tool/compile_prelude.rb @@ -8,6 +8,7 @@ $:.unshift(File.expand_path("../..", __FILE__)) preludes = ARGV.dup outfile = preludes.pop +init_name = outfile[/\w+(?=_prelude.c\z)/] || 'prelude' C_ESC = { "\\" => "\\\\", @@ -72,7 +73,7 @@ static const char prelude_code<%=i%>[] = % } void -Init_prelude(void) +Init_<%=init_name%>(void) { % lines_list.each_with_index {|(setup_lines, lines), i| rb_iseq_eval(rb_iseq_compile( -- cgit v1.2.3