Calculate header line count instead of hardcoding
This commit is contained in:
parent
1020f7e3aa
commit
09b936d89c
@ -204,6 +204,7 @@ def mk_builtin_header file
|
|||||||
file = file.tr(File::ALT_SEPARATOR, File::SEPARATOR)
|
file = file.tr(File::ALT_SEPARATOR, File::SEPARATOR)
|
||||||
ofile = ofile.tr(File::ALT_SEPARATOR, File::SEPARATOR)
|
ofile = ofile.tr(File::ALT_SEPARATOR, File::SEPARATOR)
|
||||||
end
|
end
|
||||||
|
lineno = __LINE__
|
||||||
f.puts "// -*- c -*-"
|
f.puts "// -*- c -*-"
|
||||||
f.puts "// DO NOT MODIFY THIS FILE DIRECTLY."
|
f.puts "// DO NOT MODIFY THIS FILE DIRECTLY."
|
||||||
f.puts "// auto-generated file"
|
f.puts "// auto-generated file"
|
||||||
@ -215,7 +216,7 @@ def mk_builtin_header file
|
|||||||
f.puts '#include "builtin.h" /* for RB_BUILTIN_FUNCTION */'
|
f.puts '#include "builtin.h" /* for RB_BUILTIN_FUNCTION */'
|
||||||
f.puts 'struct rb_execution_context_struct; /* in vm_core.h */'
|
f.puts 'struct rb_execution_context_struct; /* in vm_core.h */'
|
||||||
f.puts
|
f.puts
|
||||||
lineno = 11
|
lineno = __LINE__ - lineno - 1
|
||||||
line_file = file
|
line_file = file
|
||||||
|
|
||||||
inlines.each{|cfunc_name, (body_lineno, text, params, func_name)|
|
inlines.each{|cfunc_name, (body_lineno, text, params, func_name)|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user