100 Commits

Author SHA1 Message Date
cremno ad21e5e6d8 fix MRB_DISABLE_STDIO typos 2015-11-17 00:08:41 +01:00
Yukihiro "Matz" Matsumoto 4440566b95 DISABLE_STDIO/ENABLE_DEBUG macros to rename; close #3014
changes:
 * rename DISABLE_STDIO -> MRB_DISABLE_STDIO
 * rename ENABLE_DEBUG -> MRB_ENABLE_DEBUG_HOOK
 * no more opposite macro definitions (e.g. ENABLE_STDIO, DISABLE_DEBUG).
 * rewrite above macro references throughout the code.
 * update documents
2015-11-17 07:30:34 +09:00
Yukihiro "Matz" Matsumoto 798ec3aff4 UTF-8 string support in core
define MRB_UTF8_STRING (in mrbconf.h) to enable UTF-8 support.
2015-09-24 02:37:33 +09:00
Seba Gamboa c127614638 Setting up doxygen groups 2015-09-20 21:14:07 -03:00
Yukihiro "Matz" Matsumoto 6b956f1c1b use __init_array_start to determine readonly data section;
b72e94f used _etext and _edata to distinguish C string literals from heap allocated strings,
but using _edata, global char arrays may be considered as string literals.  to avoid the issue,
we have to use __init_array_start, which might be less portable.  you can still use _edata, by
using MRB_NO_INIT_ARRAY_START.
2014-10-02 09:27:39 +09:00
Yukihiro "Matz" Matsumoto b72e94fa6b mrbconf.h option MRB_USE_ETEXT_EDATA to reduce memory.
on platforms with _etext and _edata, mruby can distinguish string literals so that it avoids memory allocation to copy them.
for example, on my Linux box (x86 32bit), memory consumed by mrbtest decreased from 8,168,203 to 8,078,848 (reduced 88KB).
2014-09-30 23:48:57 +09:00
Yukihiro "Matz" Matsumoto 206f89e209 add MRB_API modifiers to mruby API functions 2014-08-04 00:47:08 +09:00
take_cheeze 62f41ddd3b Add fixed state atexit stack feature.
Adds following macros:
* MRB_FIXED_STATE_ATEXIT_STACK (not defined by default)
  * When defined enables fixed state atexit stack.
* MRB_FIXED_STATE_ATEXIT_STACK_SIZE (default value: 5)
  * This macro will be ignored when `MRB_FIXED_STATE_ATEXIT_STACK` isn't defined.
  * When `mrb_state_atexit` is called more than this value it will raise runtime error.
2014-06-16 16:03:35 +09:00
yui-knk 087bab2335 Remove space. 2014-05-18 13:32:34 +09:00
Yukihiro "Matz" Matsumoto 7074a55913 revert changes to mrbconf.h 2014-03-01 10:53:38 +09:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
Yukihiro "Matz" Matsumoto 9fab01caee remove MRB_IREP_ARRAY_INIT_SIZE which is no longer used 2013-12-24 07:26:35 +09:00
Yukihiro "Matz" Matsumoto ed0d9f0066 remove MRB_PARSER_BUF_SIZE configuration; close #1596 2013-11-25 09:48:31 +09:00
Yukihiro "Matz" Matsumoto 07b8a5b042 Make mrb->arena variable sized. Use MRB_GC_FIXED_ARENA for old behavior.
You will not see "arena overflow" error anymore, but I encourage gem authors
to check your gems with MRB_GC_FIXED_ARENA to avoid memory broat.
2013-11-22 09:20:06 +09:00
Yukihiro "Matz" Matsumoto 1e87bf6d2f allow turning off GC generational mode by default by MRB_GC_TURN_OFF_GENERATIONAL; #1447 2013-08-08 21:42:20 +09:00
Yukihiro "Matz" Matsumoto 4e877bc92f restructure header files; move non config lines away from mrbconf.h 2013-06-10 14:40:32 +09:00
kimu_shu e720782f81 Add MRB_WORD_BOXING mode (represent mrb_value as a word) 2013-05-26 10:09:17 +09:00
Ryan Scott 37e3643f8f Potential fix for 'inline' macro redefinition error - VS2012 C++ 2013-05-11 23:32:49 +10:00
Yukihiro "Matz" Matsumoto 8890a992a6 always use unsigned int as mrb_bool even in C++ 2013-04-29 09:23:43 +09:00
Yukihiro "Matz" Matsumoto ecd87aa545 quote error message in mrbconf.h to stop warning 2013-04-26 18:49:12 +09:00
Masaki Muranaka d4476109c4 Add a descrption of MRB_INT16. 2013-04-26 11:44:53 +09:00
Masaki Muranaka cbcd39bae4 Avoid defining MRB_INT16 adn MRB_INT64 at the same time. This is a poka-yoke. 2013-04-26 11:41:34 +09:00
Masaki Muranaka 59c8d6c13a Remove str_to_mrb_int(). There is some reasons.
It is not used in the core.
 It does not have mrb_ prefix.
 strtol() is slightly heavy and we have similar API.
2013-03-29 16:31:11 +09:00
Masaki Muranaka 2f8dc97e2d Move TRUE/FALSE existence checks. 2013-03-29 10:41:28 +09:00
Masaki Muranaka 6eda7c28e9 Include stddef.h. It is required by size_t. In case you include stdio.h, stddef.h is included indirectly. 2013-03-24 13:42:25 +09:00
Yukihiro Matz Matsumoto e69a13a20e resolve conflict 2013-03-24 00:44:28 +09:00
Masaki Muranaka 4656073b60 Add configuration macro MRB_PARSER_BUF_SIZE. 2013-03-22 16:46:56 +09:00
Yukihiro Matz Matsumoto 13cd0363f0 applying C++ patch from @monaka to support C++ bool type; close #1019 2013-03-18 07:57:07 +09:00
Yukihiro Matz Matsumoto 228687cfff experimental MRB_INT16 added 2013-03-14 23:12:00 +09:00
Masaki Muranaka 1ffc9ba325 Define type mrb_bool. It is typedef-ed to _Bool on C99, unsigned int on MSVC.
It is safer than applying 1bit bit-fields to signed int.

For forward compatibility, you should substiture only 1 or 0 for the variable typed mrb_bool.
2013-03-14 15:13:12 +09:00
Masaki Muranaka e2d31ba3f3 Rename STR_BUF_MIN_SIZE to MRB_STR_BUF_MIN_SIZE. Make it configurable. 2013-03-12 17:10:18 +09:00
Cremno f719b0e7ff define and use print format macros for mrb_int
For portability: %ld can't be used to print a 64-bit mrb_int on
WIN(32|64) because long is 32-bit wide.
2013-03-08 18:20:54 +01:00
Masaki Muranaka 5a025813b5 Include stdio.h in mrbconf.h instead of C extension sources. 2013-03-05 01:38:51 +09:00
Masaki Muranaka 97136825e2 Separate Kernel#sprintf support from mruby core. It's moved to mrbgems. 2013-03-04 23:04:39 +09:00
Yukihiro "Matz" Matsumoto e13248bedf Merge pull request #884 from monaka/pr-use-MRB_IREP_ARRY_INIT_SIZE-macro
Use MRB_IREP_ARRAY_INIT_SIZE macro.
2013-03-03 16:40:27 -08:00
Masaki Muranaka 6cd7017ec1 Remove trailing whitespaces. This is just a cosmetic change. 2013-03-03 10:54:00 +09:00
mattn 138ecf4723 Pluggable Struct 2013-03-01 13:37:46 +09:00
mattn 6bee2fd193 Pluggable Math 2013-02-28 17:52:18 +09:00
mattn f2d62c7c9f Fix build 2013-02-26 17:22:24 +09:00
Masaki Muranaka 6dda588503 Use MRB_IREP_ARRAY_INIT_SIZE macro. It should be configurable since it is possible to reduce RAM size. 2013-02-25 13:59:20 +09:00
Masaki Muranaka dd62349749 Reduce sprintf() calls. Remove mrb_int_to_str() and MRB_INT_FORMAT. 2013-02-23 21:21:15 +09:00
Yukihiro Matz Matsumoto a118c30861 better comment description for mrbconf.h configuration 2013-02-21 22:31:35 +09:00
Yukihiro Matz Matsumoto 9931f00863 remove unused HAVE_UNISTD_H altogether; ref #865 2013-02-21 22:28:32 +09:00
brainopia 483dce4b33 Clean up mrbconf.h
- undef for windows is not used by default so comment it
- casting to the same type is not needed
- parenthesis are not needed for macro attributes separated by commas
- change order of MRB_NAN_BOXING and MRB_INT64 to simplify logic
2013-02-21 16:54:44 +04:00
Yukihiro "Matz" Matsumoto 21822f4ee5 Merge pull request #851 from mattn/bye_bye_regexp
Remove DISABLE_REGEXP
2013-02-17 23:39:43 -08:00
Yuichiro MASUI 111cbca68c Changed debugger hook to disable 2013-02-18 16:36:15 +09:00
mattn 7b5ec7126a Remove DISABLE_REGEXP 2013-02-18 16:29:07 +09:00
Yukihiro "Matz" Matsumoto 66a7b04b25 Merge pull request #845 from masuidrive/hook_fetch
Added a hook at VM code fetch.
2013-02-17 23:11:49 -08:00
Yuichiro MASUI bc44d06c73 Created hook at VM code fetch. It's for debugger 2013-02-17 00:13:42 +09:00
mattn b1a5146ea8 Pluggable Regexp 2013-02-15 04:38:27 +09:00