Skip to content

Commit fe95f44

Browse files
committed
rename mrb_atexit to mrb_state_atexit to clarify a func will be called at the end of state, not process; ref mruby#2211
1 parent 2e7de03 commit fe95f44

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/mruby.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ void* mrb_pool_realloc(struct mrb_pool*, void*, size_t oldlen, size_t newlen);
418418
mrb_bool mrb_pool_can_realloc(struct mrb_pool*, void*, size_t);
419419
void* mrb_alloca(mrb_state *mrb, size_t);
420420

421-
void mrb_atexit(mrb_state *mrb, mrb_atexit_func func);
421+
void mrb_state_atexit(mrb_state *mrb, mrb_atexit_func func);
422422

423423
#ifdef MRB_DEBUG
424424
#include <assert.h>

src/state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ mrb_top_self(mrb_state *mrb)
266266
}
267267

268268
void
269-
mrb_atexit(mrb_state *mrb, mrb_atexit_func f)
269+
mrb_state_atexit(mrb_state *mrb, mrb_atexit_func f)
270270
{
271271
size_t stack_size;
272272

tasks/mrbgems.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ MRuby.each_target do
3434
f.puts %Q[void]
3535
f.puts %Q[mrb_init_mrbgems(mrb_state *mrb) {]
3636
f.puts %Q[#{gems.map{|g| "GENERATED_TMP_mrb_%s_gem_init(mrb);" % g.funcname}.join("\n")}]
37-
f.puts %Q[mrb_atexit(mrb, mrb_final_mrbgems);]
37+
f.puts %Q[mrb_state_atexit(mrb, mrb_final_mrbgems);]
3838
f.puts %Q[}]
3939
end
4040
end

0 commit comments

Comments
 (0)