mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby configuration macros.
stdio setting.
ENABLE_STDIO
- Will be defined automatically if
DISABLE_STDIOisn'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_hookand/ordebug_op_hookofmrb_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_DEBUGisn't defined.
MRB_DEBUG
- When defined
mrb_assert*macro will be defined with macros from<assert.h>. - Could be enabled via
enable_debugmethod ofMRuby::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_DOUBLINGis defined.
MRB_STACK_MAX
- Default value is
0x40000 - MRB_STACK_GROWTH. - Raises
RuntimeErrorwhen stack size exceeds this value.