Sha256: bf69c98f616eea00df504d7b529c214b59f66048f16e3a184e521028f6611b73
Contents?: true
Size: 1.29 KB
Versions: 5
Compression:
Stored size: 1.29 KB
Contents
#ifndef global_entry__h_ #define global_entry__h_ st_table * rb_global_tbl; #ruby <<END $: << '../..' $: << '.' # TODO: hack require 'ruby_source_dir' variable_c_location = "#{RUBY_SOURCE_DIR}/variable.c" File.open(variable_c_location) do |variable_c| write = false stopwrite = false prev_line = '' while (line = variable_c.gets) != nil do case line when /^struct (global_entry|global_variable|trace_var)\s*\{/ write = true stopwrite = false when /^static\s+(VALUE|void)\s+(undef_getter|undef_setter|undef_marker)\(\)/, /^static\s+(VALUE|void)\s+(val_getter|val_setter|val_marker)\(\)/ write = true stopwrite = true when /^(rb_global_entry)\(.*\)/, /^(undef_getter|undef_setter|undef_marker)\(.*\)/, /^(val_getter|val_setter|val_marker)\(.*\)/, /^struct global_variable \{/ puts prev_line write = true stopwrite = false when /^#define (global_entry|global_variable|gvar_getter_t|gvar_setter_t|gvar_marker_t|undef_getter|undef_setter|undef_marker|val_getter|val_setter|val_marker)/ puts line when /^\}/ stopwrite = true end puts line if write write = false if stopwrite prev_line = line end end END #endif
Version data entries
5 entries across 5 versions & 1 rubygems