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
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