Yukihiro "Matz" Matsumoto
0fa3668e91
Merge pull request #2498 from cremno/msvc-snprintf
...
MSVC: add simple (v)snprintf implementation
2014-08-04 10:51:32 +09:00
Yukihiro "Matz" Matsumoto
29bfbac86d
Merge pull request #2501 from cremno/static-mrb_str_size
...
change linkage of mrb_str_size to internal
2014-08-04 10:48:11 +09:00
Yukihiro "Matz" Matsumoto
50a6b48d53
Merge pull request #2497 from cremno/fix-conversion-warnings
...
fix conversion warnings (in gc.c)
2014-08-04 10:44:44 +09:00
Yukihiro "Matz" Matsumoto
37a75b096e
Merge pull request #2496 from cremno/remove-unnecessary-char_bit-check
...
remove unnecessary CHAR_BIT != 8 check
2014-08-04 10:44:05 +09:00
cremno
7dabb33cf0
change linkage of mrb_str_size to internal
...
Use RSTRING_LEN to get the length.
2014-08-04 01:14:23 +02: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
cremno
a70413c4ea
fix conversion warnings
...
Those warnings are not enabled by default,
but getting rid of them doesn't hurt.
2014-08-03 19:54:31 +02:00
Yukihiro "Matz" Matsumoto
206f89e209
add MRB_API modifiers to mruby API functions
2014-08-04 00:47:08 +09:00
Jun Hiroe
41fddeded0
Use Boolean macro in variable.c
2014-08-02 13:56:22 +09:00
cremno
df21609a20
remove unnecessary CHAR_BIT != 8 check
...
mruby uses uint8_t which implies CHAR_BIT == 8.
2014-08-02 02:06:42 +02:00
Jun Hiroe
18d8f9d124
Refactor sym_equal() in symbol.c
2014-07-27 15:56:21 +09:00
Yukihiro "Matz" Matsumoto
e2f7e485e7
Merge pull request #2478 from dreamedge/add_module_function
...
add Module#module_function
2014-07-26 09:35:58 +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
Yukihiro "Matz" Matsumoto
1b5584b3c8
check if block is given in eval_under(); fix #2486
2014-07-23 02:08:37 +09:00
take_cheeze
3c96602574
Use MRB_TT_EXCEPTION in exception object.
2014-07-21 23:09:13 +09:00
Yukihiro "Matz" Matsumoto
4cc9e5d8b1
since #1441 , NaN boxing with 64bit pointer works; close #2476
2014-07-21 21:55:52 +09:00
dreamedge
0b8a0f4bb4
add Module#module_function
2014-07-18 09:50:54 +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
Yukihiro "Matz" Matsumoto
1dc6a8c872
avoid infinite recursion when error was happened in #inspect; fix #2474
2014-07-17 01:42:03 +09:00
Yukihiro "Matz" Matsumoto
472a1c244e
backtrace supression condition was wrong; fix #2472
2014-07-15 08:34:34 +09:00
take_cheeze
dbece716ea
Use mrb_bool as return type of mrb_const_defined_at.
2014-07-14 21:04:22 +09:00
Tatsuhiko Kubo
5b5313ec97
use C style comments instead of C++ style comments
2014-07-13 00:24:45 +09:00
Yukihiro "Matz" Matsumoto
6137bf9e71
avoid print backtrace for SystemStackError
2014-07-12 22:10:48 +09:00
Yukihiro "Matz" Matsumoto
4501598f27
use SystemStackError instead of RuntimeError
2014-07-12 21:29:46 +09:00
cremno
aff65afe97
check the return value of fwrite
2014-07-12 20:36:45 +09:00
Yukihiro "Matz" Matsumoto
61ce5892cc
remove spaces after open parens
2014-07-12 20:36:45 +09:00
Yukihiro "Matz" Matsumoto
42110dcee1
Merge pull request #2455 from cremno/readint_mrb_int-check-base
...
invalid base shouldn't silently fail
2014-07-09 23:05:01 +09:00
cremno
ef59f553a3
invalid base shouldn't silently fail
...
Revert 44a5809224 and check range of
`base` with `mrb_assert`.
It actually can only be either 2, 8, 10 or 16 (and never 0), unless
mruby sources are modified. But I don't see a reason to impose further
limits.
2014-07-09 13:55:08 +02:00
cremno
881f054cbf
remove unused mrb_str_body
2014-07-09 11:56:29 +02:00
Yukihiro "Matz" Matsumoto
506cda5a28
Merge branch 'master' of github.com:mruby/mruby
2014-07-09 07:17:40 +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
Yukihiro "Matz" Matsumoto
ef432d7524
Merge pull request #2451 from take-cheeze/remove_mem_out_check
...
Remove unnecessary out of memory check in `ary_expand_capa`.
2014-07-08 23:07:30 +09:00
take_cheeze
5b0f900faa
Remove unnecessary out of memory check in ary_expand_capa.
...
Since `mrb_realloc` raises when failed to allocate memory.
2014-07-07 21:58:38 +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
Yukihiro "Matz" Matsumoto
5c50bcd20a
reformat else part; ref #2447
2014-07-06 21:00:57 +09:00
take_cheeze
6cbcbd5290
Reduce allocation in shared RArray clearing.
2014-07-05 21:10:02 +09:00
take_cheeze
a50464fe01
Fix type checking in mrb_flo_to_fixnum.
2014-07-04 16:16:06 +09:00
take_cheeze
77aefa1d03
Always return non-NULL in mrb_hash_tbl.
2014-07-03 22:56:15 +09:00
Yukihiro "Matz" Matsumoto
d2910a162d
Merge pull request #2442 from suzukaze/use-mrb-str-nofree-macro
...
Use RSTR_NOFREE_P in state.c
2014-07-03 21:45:28 +09:00
Jun Hiroe
569ea74021
Use *_EMBED_* macro in state.c
2014-07-03 18:26:42 +09:00
Jun Hiroe
bd82d7c794
Use RSTR_NOFREE_P in state.c
2014-07-03 18:10:51 +09:00
David Turnbull
5486e8901a
Ensure RVALUE is large enough for word boxing types.
2014-07-02 09:50:38 -07:00
Yukihiro "Matz" Matsumoto
684f8ec575
Merge pull request #2430 from SHyx0rmZ/remove-duplicate
...
Sacrifice some micro-optimization to remove duplicate code
2014-06-28 17:15:30 +09:00
Yukihiro "Matz" Matsumoto
919af61766
initialize nomem_err->mesg->c before exposing to Ruby world; close #2428
2014-06-27 22:39:39 +09:00
Yukihiro "Matz" Matsumoto
4ce0a7653b
reduce mrb_funcall in exception allocation
2014-06-27 22:10:21 +09:00
Patrick Pokatilo
73c086b4c7
Sacrifice some micro-optimization to remove duplicate code
2014-06-26 22:22:21 +02:00
ksss
f092ef6b14
OP_ENTER: Rewrite split aspec use macros
2014-06-25 13:54:11 +09:00
ksss
19b82944f8
Proc#arity return 0 when opcode was not OP_ENTER
2014-06-25 08:48:08 +09:00