diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-18 23:10:20 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-18 23:10:20 +0900 |
| commit | 61b495c15961c3be4158c6ff33e0ec07480d6c7a (patch) | |
| tree | d59263aa685742323ec621c510edaf15f9e560f8 | |
| parent | b25fd05ee5fede9ebef8098a0b72a9ff69c4863d (diff) | |
| parent | b6982c192750464ee4ab06bc689cd383940dc52f (diff) | |
| download | mruby-61b495c15961c3be4158c6ff33e0ec07480d6c7a.tar.gz mruby-61b495c15961c3be4158c6ff33e0ec07480d6c7a.zip | |
Merge branch 'master' of github.com:mruby/mruby
| -rw-r--r-- | doc/mrbconf/README.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/mrbconf/README.md b/doc/mrbconf/README.md new file mode 100644 index 000000000..930e185da --- /dev/null +++ b/doc/mrbconf/README.md @@ -0,0 +1,38 @@ +# mruby configuration macros. + +## stdio setting. +`ENABLE_STDIO` +* Will be defined automatically if `DISABLE_STDIO` isn't defined. +* Uses `<stdio.h>` functions. + +`DISABLE_STDIO` +* When defined `<stdio.h>` functions won't be used. + +## Debug macros. +`ENABLE_DEBUG` +* When defined code fetch hook and debug OP hook will be enabled. +* When using any of the hook set function pointer `code_fetch_hook` and/or `debug_op_hook` of `mrb_state`. +* Fetch hook will be called before any OP. +* Debug OP hook will be called when dispatching `OP_DEBUG`. + +`DISABLE_DEBUG` +* Will be define automatically if `ENABLE_DEBUG` isn't defined. + +`MRB_DEBUG` +* When defined `mrb_assert*` macro will be defined with macros from `<assert.h>`. +* Could be enabled via `enable_debug` method of `MRuby::Build`. + +## Stack configuration + +`MRB_STACK_EXTEND_DOUBLING` +* If defined doubles the stack size when extending it. +* Else extends stack with `MRB_STACK_GROWTH`. + +`MRB_STACK_GROWTH` +* Default value is `128`. +* Used in stack extending. +* Ignored when `MRB_STACK_EXTEND_DOUBLING` is defined. + +`MRB_STACK_MAX` +* Default value is `0x40000 - MRB_STACK_GROWTH`. +* Raises `RuntimeError` when stack size exceeds this value. |
