1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Full-path of builtin scripts no longer needed

This commit is contained in:
Nobuyoshi Nakada 2019-11-09 19:43:14 +09:00
parent dfaac2b372
commit e3c8524411
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
4 changed files with 5 additions and 7 deletions

View file

@ -18,7 +18,7 @@ builtin_lookup(const char *feature, size_t *psize)
} }
void 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 // search binary
size_t size; size_t size;

View file

@ -12,7 +12,7 @@ struct rb_builtin_function {
#define RB_BUILTIN_FUNCTION(_i, _name, _arity) { .name = #_name, .func_ptr = (void *)_name, .argc = _arity, .index = _i } #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 #ifndef VM_CORE_H_EC_DEFINED
typedef struct rb_execution_context_struct rb_execution_context_t; typedef struct rb_execution_context_struct rb_execution_context_t;

View file

@ -10,7 +10,7 @@ static struct st_table *loaded_builtin_table;
rb_ast_t *rb_builtin_ast(const char *feature_name, VALUE *name_str); rb_ast_t *rb_builtin_ast(const char *feature_name, VALUE *name_str);
void 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; VALUE name_str = 0;
rb_ast_t *ast = rb_builtin_ast(feature_name, &name_str); rb_ast_t *ast = rb_builtin_ast(feature_name, &name_str);

View file

@ -67,10 +67,9 @@ def mk_builtin_header file
f.puts "COMPILER_WARNING_POP" f.puts "COMPILER_WARNING_POP"
path = File.expand_path(file)
f.puts f.puts
f.puts " // load" 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 "}" f.puts "}"
} }
@ -78,6 +77,5 @@ end
ARGV.each{|file| ARGV.each{|file|
# feature.rb => load_feature.inc # feature.rb => load_feature.inc
path = File.expand_path(file) mk_builtin_header file
mk_builtin_header path
} }