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:
		
							parent
							
								
									dfaac2b372
								
							
						
					
					
						commit
						e3c8524411
					
				
					 4 changed files with 5 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue