rename mrb_atexit to mrb_state_atexit to clarify a func will be called at the...

rename mrb_atexit to mrb_state_atexit to clarify a func will be called at the end of state, not process; ref #2211
parent 2e7de03f
......@@ -418,7 +418,7 @@ void* mrb_pool_realloc(struct mrb_pool*, void*, size_t oldlen, size_t newlen);
mrb_bool mrb_pool_can_realloc(struct mrb_pool*, void*, size_t);
void* mrb_alloca(mrb_state *mrb, size_t);
void mrb_atexit(mrb_state *mrb, mrb_atexit_func func);
void mrb_state_atexit(mrb_state *mrb, mrb_atexit_func func);
#ifdef MRB_DEBUG
#include <assert.h>
......
......@@ -266,7 +266,7 @@ mrb_top_self(mrb_state *mrb)
}
void
mrb_atexit(mrb_state *mrb, mrb_atexit_func f)
mrb_state_atexit(mrb_state *mrb, mrb_atexit_func f)
{
size_t stack_size;
......
......@@ -34,7 +34,7 @@ MRuby.each_target do
f.puts %Q[void]
f.puts %Q[mrb_init_mrbgems(mrb_state *mrb) {]
f.puts %Q[#{gems.map{|g| "GENERATED_TMP_mrb_%s_gem_init(mrb);" % g.funcname}.join("\n")}]
f.puts %Q[mrb_atexit(mrb, mrb_final_mrbgems);]
f.puts %Q[mrb_state_atexit(mrb, mrb_final_mrbgems);]
f.puts %Q[}]
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment