Commit Graph

423 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 3244ddf0c3 presreve local variables names in irep->lv 2014-04-28 07:29:37 +09:00
Yukihiro "Matz" Matsumoto c235d8f08d Merge pull request #2142 from cremno/rename-mrb_str_buf_append
rename `mrb_str_buf_append` to `mrb_str_cat_str`
2014-04-28 05:57:01 +09:00
cremno 91c22f32f4 rename mrb_str_buf_append to mrb_str_cat_str
The new name is better and less confusing, because:
  - `mrb_str_append` calls `mrb_str_to_str` and this function doesn't
  - `mrb_str_buf_append` _is_ `mrb_str_cat` for `mrb_value` strings
2014-04-27 22:33:22 +02:00
kyab 10cc4be32d Fix MSVC warnings for numeric.c 2014-04-28 03:07:28 +09:00
Yukihiro "Matz" Matsumoto c15da653b2 Merge pull request #2118 from ksss/range-bool
RRange excl flag use mrb_bool insteard of int
2014-04-26 01:30:04 +09:00
Yukihiro "Matz" Matsumoto 83c1399af0 eliminate plain int except for a few cases like arena_index 2014-04-25 04:01:57 +09:00
ksss f1d85c2f97 mrb_range_new excl flag use mrb_bool insteard of int 2014-04-24 13:18:57 +00:00
cremno bc23a5e9e5 remove mrb_str_buf_cat
It does the same as `mrb_str_cat`.
2014-04-21 21:28:06 +02:00
mirichi d3efe18143 do not reuse deleted entry. fixed 2014-04-20 23:10:24 +09:00
take_cheeze d4a510f751 Add mrb_regexp_p to check whether mrb_value is Regexp. 2014-04-17 14:32:45 +09:00
take_cheeze c0eaaf3559 Move src/re.h to include/mruby/re.h . 2014-04-16 22:39:57 +09:00
Yukihiro "Matz" Matsumoto ac5091e211 use quadratic probing in khash.h 2014-04-13 18:30:22 +09:00
Yukihiro "Matz" Matsumoto 6d6ae570cb add kh_push2() to check if entry is added 2014-04-13 18:20:37 +09:00
Yukihiro "Matz" Matsumoto 45eccd1333 khash.h: use first found k_del 2014-04-13 00:32:23 +09:00
Yukihiro "Matz" Matsumoto 92156b4619 Merge pull request #2044 from take-cheeze/const_argv
Qualify argv argument of API `const`.
2014-04-11 23:45:15 +09:00
ksss 91f68f77a8 kh_put return value should be found index 2014-04-11 21:13:43 +09:00
Takeshi Watanabe 824d3450c5 Qualify argv argument of API const. 2014-04-11 20:38:23 +09:00
ksss b6cfe0e001 Fix bug kh_put after kh_del report by @mirichi 2014-04-11 19:32:32 +09:00
ksss 93904fee21 Refactoring for kh_put 2014-04-10 08:48:34 +09:00
Yukihiro "Matz" Matsumoto aecdafb9ce kh_put in khash.h should work when direct bucket is deleted one 2014-04-10 00:53:32 +09:00
Yukihiro "Matz" Matsumoto 8389066272 Merge pull request #2036 from ksss/assert-kh_del
add assert before write khash del flags
2014-04-10 00:16:32 +09:00
Yukihiro "Matz" Matsumoto 020116fa6b revert 40eaf705 for performance reason; ref #2022 2014-04-10 00:14:57 +09:00
ksss cf5aabeba1 add assert before write khash del flags 2014-04-09 23:11:37 +09:00
take_cheeze 90d74b99ff Add MRB_TT_HAS_BASIC_P macro to check whether a typetag has MRB_OBJECT_HEADER. 2014-04-09 14:26:26 +09:00
Yukihiro "Matz" Matsumoto 0d9cc9ccc6 Merge pull request #2023 from ksss/khash-readable
Use kh_end instead to n_buckets
2014-04-06 23:19:40 +09:00
ksss f946465fe4 Use kh_end instead to n_buckets 2014-04-06 13:45:32 +00:00
ksss 40eaf7058c Delete khash_mask macro.
And fix expression to more simple and readable.
2014-04-06 13:26:10 +00:00
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 b4dd3564ef REnv uses obj->c as env link; no super 2014-03-25 11:50:11 +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 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 048bca43c9 string length type to be mrb_int 2014-03-15 15:47:21 +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
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