diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-17 11:54:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-17 11:54:50 +0900 |
| commit | abb682eaf1a61ead85e7bb1e68e473b3cfa9a194 (patch) | |
| tree | 585c779796a2d612ddef689a654537606999b4ff /include/mruby.h | |
| parent | d9985631e7bbbfbd9b5d7ec33d6060b5aa02e6c8 (diff) | |
| parent | 62f41ddd3bf8a1afa3d7ed94081835f8996ecbc4 (diff) | |
| download | mruby-abb682eaf1a61ead85e7bb1e68e473b3cfa9a194.tar.gz mruby-abb682eaf1a61ead85e7bb1e68e473b3cfa9a194.zip | |
Merge pull request #2401 from take-cheeze/fixed_state_atexit_stack
Add fixed state atexit stack feature.
Diffstat (limited to 'include/mruby.h')
| -rw-r--r-- | include/mruby.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h index dcc01b2dd..7b9f1b428 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -52,6 +52,10 @@ typedef void* (*mrb_allocf) (struct mrb_state *mrb, void*, size_t, void *ud); #define MRB_GC_ARENA_SIZE 100 #endif +#ifndef MRB_FIXED_STATE_ATEXIT_STACK_SIZE +#define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5 +#endif + typedef struct { mrb_sym mid; struct RProc *proc; @@ -173,7 +177,11 @@ typedef struct mrb_state { void *ud; /* auxiliary data */ +#ifdef MRB_FIXED_STATE_ATEXIT_STACK + mrb_atexit_func atexit_stack[MRB_FIXED_STATE_ATEXIT_STACK_SIZE]; +#else mrb_atexit_func *atexit_stack; +#endif mrb_int atexit_stack_len; } mrb_state; |
