Commit Graph

652 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto fc2b37f0ee space adjustment in khash.h 2014-04-03 20:35:27 +09:00
ksss 169cf75b1e delete khash member upper_bound 2014-04-03 11:26:37 +00:00
ksss 84ccc82ef9 Delete khash member mask and inc
because there can be substituted by n_buckets
2014-04-02 15:42:31 +00:00
ksss 8d15ef2e89 Use bool macro KHASH_DEFINE and KHASH_DECLARE 2014-04-02 13:38:43 +00:00
ksss 0f1a984a4f use size_t instead of int 2014-04-02 13:24:50 +00:00
ksss c816558b01 delete unused indexes __m_* masks 2014-04-02 12:44:11 +00:00
take_cheeze 755ded2ef0 Use MRB_ENV_STACK_SHARED_P to check cioff field of REnv. 2014-04-01 01:53:28 +09:00
take_cheeze b38eb72d82 Add macro MRB_ENV_UNSHARE_STACK instead of assigning -1 directly. 2014-04-01 01:35:40 +09:00
take_cheeze 80534b6d14 Use MRB_ENV_STACK_LEN instead of accessing flags directly to get REnv's stack length. 2014-04-01 01:13:39 +09:00
take_cheeze bf6b1dfe21 Add API to define cfunc Proc with userdata.
The APIs are defined in mruby-proc-ext so include it before using this API.
See mruby-proc-ext's test code for usage.
This should resolve #1794.
2014-03-31 10:01:17 +09:00
Yukihiro "Matz" Matsumoto 514cafe6c3 do not use "to_f" to retrieve floats in mrb_get_args(); close #1965 2014-03-28 11:04:15 +09:00
Yukihiro "Matz" Matsumoto bfd2a539ed add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942 2014-03-26 01:09:09 +09:00
Yukihiro "Matz" Matsumoto b4dd3564ef REnv uses obj->c as env link; no super 2014-03-25 11:50:11 +09:00
cubicdaiya 8f8c174fc2 Use MRB_ARGS_REST() instead of ARGS_REST()
According to include/mruby.h,

 /* compatibility macros; will be removed */
 #define ARGS_REST()         MRB_ARGS_REST()
2014-03-23 12:48:34 +09:00
take_cheeze e854a0e850 make Fiber#transfer compatible with CRuby 2014-03-21 22:10:47 +09:00
take_cheeze 272fe3d864 use FiberError in fiber exception raise 2014-03-20 04:38:34 +09:00
Yukihiro "Matz" Matsumoto d9107fd157 Merge pull request #1890 from take-cheeze/fiber_resuming
Revert MRB_FIBER_RESUMED as MRB_FIBER_RESUMING.
2014-03-19 08:59:45 +09:00
Yukihiro "Matz" Matsumoto 9084e03556 rename mrb_yield_internal to mrb_yield_with_class since it's no longer internal 2014-03-19 08:57:54 +09:00
Tomoyuki Sahara 93694fe521 export mrb_yield_internal. 2014-03-19 01:08:01 +09:00
take_cheeze 19c4bf6fcb revert MRB_FIBER_RESUMED as MRB_FIBER_RESUMING to fix recurive resume 2014-03-19 01:05:21 +09:00
Yukihiro "Matz" Matsumoto 792c1add0c string functions arguments changed from mrb_int to size_t that would take strlen() 2014-03-19 00:46:27 +09:00
Yukihiro "Matz" Matsumoto 180b3d5678 change mrb_int to size_t that would take strlen() 2014-03-19 00:17:03 +09:00
Yukihiro "Matz" Matsumoto 3e24e06b29 add a space after C reserved words 2014-03-18 23:57:29 +09:00
cubicdaiya cee152670a unify indent style 2014-03-16 07:44:44 +09:00
Yukihiro "Matz" Matsumoto ef884caca5 Merge branch 'master' of github.com:mruby/mruby 2014-03-15 16:03:21 +09:00
Yukihiro "Matz" Matsumoto 048bca43c9 string length type to be mrb_int 2014-03-15 15:47:21 +09:00
Yukihiro "Matz" Matsumoto c476c1b528 symbol length type to be mrb_int 2014-03-15 15:43:40 +09:00
take_cheeze 62f05614ee Add Fiber's double resume test and fix it. 2014-03-15 15:18:06 +09:00
Yukihiro "Matz" Matsumoto ddd1bfda02 type of mrb_type() should be enum mrb_vtype when MRB_NAN_BOXING is on 2014-03-15 14:30:17 +09:00
Yukihiro "Matz" Matsumoto 5b3c76ee48 Merge pull request #1849 from cremno/add-mrb_int_bit-macro
add MRB_INT_BIT
2014-03-13 03:09:58 +09:00
Yukihiro "Matz" Matsumoto ad04b45e5b Merge pull request #1851 from tmash06/add_include_limit_h
add including limits.h.
2014-03-13 03:09:03 +09:00
tmash06 cfcd2e2dc9 add including limits.h.
Because Android's libc(bionic) defines SIZE_MAX at limits.h.
2014-03-13 02:37:09 +09:00
cremno e4afd5374f add mrb_strlen_lit which makes _lit macros safer
strlen(3) + string literal is usually optimized but strlen(3) doesn't
check if its argument is really a string literal. This is important for
mruby's _static functions to which some _lit macros are expanded (string
literals have static storage). See comment for some additional info.

remove unnecessary parentheses
2014-03-12 17:56:08 +01:00
cremno 1b6a4fb5a2 add MRB_INT_BIT 2014-03-11 20:14:18 +01:00
take_cheeze bbb7ba46b2 don't use of anonymous unions 2014-03-11 22:01:00 +09:00
Yukihiro "Matz" Matsumoto 4f27089b4a Merge branch 'master' of github.com:mruby/mruby 2014-03-09 03:16:28 +09:00
Yukihiro "Matz" Matsumoto 24839d74b2 Merge pull request #1834 from cremno/use-nan-and-infinity-macros
use NAN and INFINITY macros
2014-03-09 03:01:04 +09:00
Yukihiro "Matz" Matsumoto 6423011986 remove invocation of strlen() on buffer of strings; with refactoring 2014-03-09 02:35:49 +09:00
cremno 8a4faae55e MSVC: add NAN and INFINITY for older versions 2014-03-08 17:25:56 +01:00
Masaki Muranaka 270d25bf2d Make type casts safer. 2014-03-08 15:53:59 +09:00
take_cheeze c3f3a0484a use sizeof(void*) instead of mrb_int size and extend embed string size 2014-03-08 00:32:59 +09:00
ksss 54132e4364 make embed string when create literals 2014-03-06 13:47:51 +00:00
ksss 4070b5987a embed small string
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
2014-03-06 13:12:08 +00:00
cremno cbc84ba5b2 error.h: add extern "C" for C++ 2014-03-05 19:50:13 +01:00
cubicdaiya dd4ddcae38 fix a comment end of include guard 2014-03-04 20:35:11 +09:00
cubicdaiya a514e31f6b introduce mrb_exc_new_str_lit for C string literals 2014-03-04 02:45:13 +09:00
Tatsuya Matsumoto 71319ac335 fix include guard style. 2014-03-03 00:46:39 +09:00
take_cheeze 23ef20624c fix compile error 2014-03-01 20:05:29 +09:00
take_cheeze 78915f9601 support c++ exception 2014-03-01 20:05:29 +09:00
Yukihiro "Matz" Matsumoto 675fd3dc80 allow send method not to call mrb_funcall if calling method is implemented in Ruby; fix #1680 ref #1765 2014-03-01 18:13:10 +09:00