Commit Graph

772 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 95c7f570e1 change class argument of mrb_const_defined_at from struct RClass* to mrb_value to make it consistent with mrb_const_defined; ref #2593 2014-09-19 02:51:52 +09:00
Yukihiro "Matz" Matsumoto 6057b2e378 change mrb_sym type from uint16_t to uint32_t 2014-09-15 01:48:08 +09:00
Yukihiro "Matz" Matsumoto 48c5321dca constify pointer from RARRAY_PTR to detect potential write barrier bugs.
if you see compiler errors due to this commit, you'd better to use array-modifying
functions, e.g. mrb_ary_set() or mrb_ary_push(), otherwise you might see nasty
GC bugs in the future.  if you are sure what you are doing, replace `RARRAY_PTR(ary)`
by `mrb_ary_ptr(ary)->ptr`. but be warned.
2014-09-12 12:42:39 +09:00
Yukihiro "Matz" Matsumoto 81c894a1c6 add some MRB_API to function prototypes 2014-09-05 00:54:51 +09:00
Yukihiro "Matz" Matsumoto 9b4ec380d2 use uint16_t instead of short; ref #2568 2014-09-05 00:47:22 +09:00
Yukihiro "Matz" Matsumoto 6c7b0d88e8 refactor valid instance variable name check 2014-09-02 16:37:40 +09:00
Yukihiro "Matz" Matsumoto 471c43ff96 move mrb_proc_new_cfunc_with_env() to the core 2014-09-02 13:03:32 +09:00
cremno 17b0d658fc delete obsolete macros (mrb_basic + mrb_object)
Over a year ago is not "soon" anymore. See:
88483fad00
243669308d
2014-08-29 16:47:28 +02:00
Yukihiro "Matz" Matsumoto 3c4cd5428a allow no_optimize esp. for debugger 2014-08-29 15:09:14 +09:00
Yukihiro "Matz" Matsumoto 9e4b012478 Merge pull request #2570 from cubicdaiya/issues/unify_duplicated_functions
Unify and rename duplicated functions (noregexp() and regexp_check()).
2014-08-29 01:09:33 +09:00
Tatsuhiko Kubo 5fa30aeaea Fix mismatches for MRB_API declarations. 2014-08-29 01:06:22 +09:00
Tatsuhiko Kubo db29a25ada Rename functions for avoinding symbol confiliction.
Add prefix(mrb) to noregexp() and regexp_check().
2014-08-28 19:18:52 +09:00
Tatsuhiko Kubo d958aa2cb1 Unify duplicated functions (noregexp() and regexp_check()). 2014-08-28 19:13:57 +09:00
cremno 89b27648dd add symbol table overflow check
Since raising an error might intern a few new strings, some symbols need
to be reserved. 8 should be sufficient.

If the real limit has been reached, mrb_bug() is called.
2014-08-27 12:51:10 +02:00
cremno 3ac4c24534 remove unused MSVC strtoll fallback 2014-08-26 00:52:31 +02:00
Tatsuhiko Kubo 3b904e9408 Unify include guard styles and header comments. 2014-08-21 13:27:37 +09:00
take_cheeze b3d0585fe5 Add API mrb_data_init to initialize MRB_TT_DATA tagged instance. 2014-08-20 22:42:35 +09:00
Jun Hiroe 21f583783d Rename GC_STATE_NONE GC_STATE_ROOT 2014-08-06 22:59:48 +09:00
Jun Hiroe 3569723ab3 Refactor obj_free() in gc.c 2014-08-05 23:16:01 +09:00
Yukihiro "Matz" Matsumoto fce644df59 Merge pull request #2508 from iij/pr-mrb-str-to-cstr-returns-mutable
revert accidental constify.
2014-08-05 16:32:52 +09:00
Tomoyuki Sahara 412b9eb827 revert accidental constify. 2014-08-05 15:02:27 +09:00
Yukihiro "Matz" Matsumoto ea80e82852 Merge branch 'master' of github.com:mruby/mruby 2014-08-04 16:28:02 +09:00
cremno b6e27218ad MSVC: add simple (v)snprintf implementation
_snprintf is not C99's snprintf!

This simple implementation, unlike _snprintf,
always null-terminates and returns the expected
return value (in most cases).
Other C99 behaviors (like format specifiers) require
adding a complete snprintf implementation.
Do we want or need that?

The same applies to vsnprintf (aka _vsnprintf).
2014-08-03 21:15:48 +02:00
Yukihiro "Matz" Matsumoto db7b01c0b3 turn string obsolete functions into macros 2014-08-04 00:53:58 +09:00
Yukihiro "Matz" Matsumoto 206f89e209 add MRB_API modifiers to mruby API functions 2014-08-04 00:47:08 +09:00
Yukihiro "Matz" Matsumoto 5e5fad2f25 fix typo with MRB_INT16; fix #2495 2014-08-03 20:30:29 +09:00
Yukihiro "Matz" Matsumoto 875c07a742 Merge pull request #2477 from take-cheeze/allocf_ud
Add field `allocf_ud` to replace current `ud`.
2014-07-24 23:22:58 +09:00
Jonas Kulla ec606e3aa7 Silence "unused parameter" warnings in C++
This has been done already, but the fixes were accidentally
removed in 249f05e7d7.
2014-07-23 21:40:15 +02:00
take_cheeze 3c96602574 Use MRB_TT_EXCEPTION in exception object. 2014-07-21 23:09:13 +09:00
take_cheeze fc8b48faf8 Move word boxing structs to "mruby/boxing_word.h". 2014-07-20 23:02:04 +09:00
take_cheeze fc9a91c4a6 Add field allocf_ud to replace current ud.
Since some use it as `mrb_state` associated user data.
2014-07-17 21:48:17 +09:00
take_cheeze dbece716ea Use mrb_bool as return type of mrb_const_defined_at. 2014-07-14 21:04:22 +09:00
Yukihiro "Matz" Matsumoto 4501598f27 use SystemStackError instead of RuntimeError 2014-07-12 21:29:46 +09:00
Yukihiro "Matz" Matsumoto 506cda5a28 Merge branch 'master' of github.com:mruby/mruby 2014-07-09 07:17:40 +09:00
Yukihiro "Matz" Matsumoto df4c298e3b rename boxing_nix.h to boxing_no.h 2014-07-09 07:06:58 +09:00
Yukihiro "Matz" Matsumoto 61bba9accf rename word boxing functions 2014-07-09 06:40:56 +09:00
Yukihiro "Matz" Matsumoto 0cf86dea0e rename SET_FIXNUM_VALUE to SET_INT_VALUE since it sets mrb_int value 2014-07-09 06:40:19 +09:00
David Turnbull 249f05e7d7 Clean up value.h and mrb_value boxing 2014-07-09 06:32:11 +09:00
take_cheeze 13d9631e21 Add new API mrb_ary_resize(mruby implementation of rb_ary_resize). 2014-07-06 22:23:29 +09:00
David Turnbull ed5c13bc11 Fix MRB_WORD_BOXING by correctly telling GC which mrb_value types are immediate. 2014-07-01 15:23:23 -07:00
ksss b0edba434c proc.h: MRB_ASPEC_REST() macro return 1 or 0
MRB_ASPEC_REST() is macro just only checks whether truthy or falsy.
And truthy means exist 1 rest argument in current proc.
2014-06-25 13:54:11 +09:00
Santa Zhang 8d5f67e6f3 add a few const qualifier 2014-06-24 15:16:13 -04:00
take_cheeze baca365caa rename mrb_open_without_mrbgems to mrb_open_core 2014-06-23 20:06:17 +09:00
take_cheeze 36813c87f6 make default allocf public to use it with mrb_open_without_mrbgems 2014-06-23 20:06:17 +09:00
take_cheeze 6bb56ed920 add mrb_open_without_mrbgems API 2014-06-23 20:06:17 +09:00
Yukihiro "Matz" Matsumoto 45e04c996e clear local variables for the first execution of mrb_context_run(); close #2405 2014-06-21 18:24:26 +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
Jun Hiroe 9c259c501a Add NOFREE macros 2014-06-11 01:00:35 +09:00
Yukihiro "Matz" Matsumoto fe95f44013 rename mrb_atexit to mrb_state_atexit to clarify a func will be called at the end of state, not process; ref #2211 2014-06-10 17:59:56 +09:00
take_cheeze 4de468e754 Fallback to mrb_assert instead of dirty trick. 2014-06-09 18:47:07 +09:00