[前][次][番号順一覧][スレッド一覧]

ruby-changes:58677

From: Nobuyoshi <ko1@a...>
Date: Sat, 9 Nov 2019 19:52:11 +0900 (JST)
Subject: [ruby-changes:58677] e3c8524411 (master): Full-path of builtin scripts no longer needed

https://git.ruby-lang.org/ruby.git/commit/?id=e3c8524411

From e3c852441177caa4b251fa33c83a65e4263a4146 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 9 Nov 2019 19:43:14 +0900
Subject: Full-path of builtin scripts no longer needed


diff --git a/builtin.c b/builtin.c
index bcc5dc6..d936d1c 100644
--- a/builtin.c
+++ b/builtin.c
@@ -18,7 +18,7 @@ builtin_lookup(const char *feature, size_t *psize) https://github.com/ruby/ruby/blob/trunk/builtin.c#L18
 }
 
 void
-rb_load_with_builtin_functions(const char *feature_name, const char *fname, const struct rb_builtin_function *table)
+rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table)
 {
     // search binary
     size_t size;
diff --git a/builtin.h b/builtin.h
index ef6ff82..ee99e21 100644
--- a/builtin.h
+++ b/builtin.h
@@ -12,7 +12,7 @@ struct rb_builtin_function { https://github.com/ruby/ruby/blob/trunk/builtin.h#L12
 
 #define RB_BUILTIN_FUNCTION(_i, _name, _arity) { .name = #_name, .func_ptr = (void *)_name, .argc = _arity, .index = _i }
 
-void rb_load_with_builtin_functions(const char *feature_name, const char *fname, const struct rb_builtin_function *table);
+void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
 
 #ifndef VM_CORE_H_EC_DEFINED
 typedef struct rb_execution_context_struct rb_execution_context_t;
diff --git a/mini_builtin.c b/mini_builtin.c
index 290a4b3..8bb262c 100644
--- a/mini_builtin.c
+++ b/mini_builtin.c
@@ -10,7 +10,7 @@ static struct st_table *loaded_builtin_table; https://github.com/ruby/ruby/blob/trunk/mini_builtin.c#L10
 rb_ast_t *rb_builtin_ast(const char *feature_name, VALUE *name_str);
 
 void
-rb_load_with_builtin_functions(const char *feature_name, const char *fname, const struct rb_builtin_function *table)
+rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table)
 {
     VALUE name_str = 0;
     rb_ast_t *ast = rb_builtin_ast(feature_name, &name_str);
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb
index 87b5e2a..4f140a6 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -67,10 +67,9 @@ def mk_builtin_header file https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_loader.rb#L67
     f.puts "COMPILER_WARNING_POP"
 
 
-    path = File.expand_path(file)
     f.puts
     f.puts "  // load"
-    f.puts "  rb_load_with_builtin_functions(\"#{base}\", \"#{file}\", #{table});"
+    f.puts "  rb_load_with_builtin_functions(#{base.dump}, #{table});"
 
     f.puts "}"
   }
@@ -78,6 +77,5 @@ end https://github.com/ruby/ruby/blob/trunk/tool/mk_builtin_loader.rb#L77
 
 ARGV.each{|file|
   # feature.rb => load_feature.inc
-  path = File.expand_path(file)
-  mk_builtin_header path
+  mk_builtin_header file
 }
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]