mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1595 from take-cheeze/filename_realloc_fix
get_filename_table_size realloc fix.
This commit is contained in:
@@ -492,6 +492,7 @@ get_filename_table_size(mrb_state *mrb, mrb_irep *irep, mrb_sym **fp, size_t *lp
|
||||
}
|
||||
for (i=0; i<irep->rlen; i++) {
|
||||
size += get_filename_table_size(mrb, irep->reps[i], fp, lp);
|
||||
filenames = *fp;
|
||||
}
|
||||
}
|
||||
return size;
|
||||
|
||||
@@ -87,6 +87,11 @@ module MRuby
|
||||
MRuby.targets[@name].instance_eval(&block)
|
||||
end
|
||||
|
||||
def enable_debug
|
||||
compilers.each { |c| c.defines += %w(MRB_DEBUG) }
|
||||
@mrbc.compile_options += ' -g'
|
||||
end
|
||||
|
||||
def toolchain(name)
|
||||
tc = Toolchain.toolchains[name.to_s]
|
||||
fail "Unknown #{name} toolchain" unless tc
|
||||
|
||||
+10
-1
@@ -1,7 +1,16 @@
|
||||
MRuby::Build.new('debug') do |conf|
|
||||
toolchain :gcc
|
||||
enable_debug
|
||||
|
||||
# include all core GEMs
|
||||
conf.gembox 'full-core'
|
||||
conf.cc.defines = %w(MRB_GC_FIXED_ARENA)
|
||||
end
|
||||
|
||||
MRuby::Build.new do |conf|
|
||||
toolchain :gcc
|
||||
|
||||
# include all core GEMs
|
||||
conf.gembox 'full-core'
|
||||
conf.cc.defines = %w(MRB_DEBUG MRB_GC_FIXED_ARENA)
|
||||
conf.cc.defines = %w(MRB_GC_FIXED_ARENA)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user