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
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;

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 }
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;

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);
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);

View File

@ -67,10 +67,9 @@ def mk_builtin_header file
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
ARGV.each{|file|
# feature.rb => load_feature.inc
path = File.expand_path(file)
mk_builtin_header path
mk_builtin_header file
}