Commit Graph

4536 Commits

Author SHA1 Message Date
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
Yukihiro "Matz" Matsumoto f85e5a80dc Merge pull request #1826 from unak/mswin
ignore *.pdb
2014-03-12 15:38:08 +09:00
Yukihiro "Matz" Matsumoto 1b845de755 Merge pull request #1848 from joejimbo/master
Added a short description about mruby gems
2014-03-12 15:12:10 +09:00
Joachim Baran 244260b05e Added a short description on how to add mruby gems to the compilation workflow. 2014-03-11 22:27:28 -07:00
Yukihiro "Matz" Matsumoto fa2e87c468 avoid mrb_string_value_cstr() to copy string between mrb_states in tests 2014-03-12 13:32:04 +09:00
Yukihiro "Matz" Matsumoto 7e8652d549 Merge pull request #1843 from take-cheeze/suppress_warnings
Suppress warnings.
2014-03-12 11:45:14 +09:00
Yukihiro "Matz" Matsumoto 9b7198c222 Merge pull request #1846 from take-cheeze/funcall_fix
Fix mrb_funcall calling.
2014-03-12 11:16:58 +09:00
take_cheeze 7c4961234d fix mrb_funcall calling 2014-03-12 10:18:38 +09:00
take_cheeze 52cf39a67a remove deprecated register keyword 2014-03-11 22:01:00 +09:00
take_cheeze bbb7ba46b2 don't use of anonymous unions 2014-03-11 22:01:00 +09:00
Yukihiro "Matz" Matsumoto fee639775e Merge pull request #1845 from ksss/sym_intern-argument-type
fix sym_intern argument type
2014-03-11 14:05:06 +09:00
ksss 58a5e832d9 fix sym_intern argument type 2014-03-11 09:12:56 +09:00
Yukihiro "Matz" Matsumoto 6dd2f36d20 Merge pull request #1842 from ksss/assert_nothing_raised
add assertion method `assert_nothing_raised'
2014-03-11 00:19:45 +09:00
ksss 23680cb447 add assertion method `assert_nothing_raised' 2014-03-11 00:13:36 +09:00
Yukihiro "Matz" Matsumoto 86a48b7c48 Merge pull request #1840 from ksss/bit-field
set bit field for mrb_bool
2014-03-10 22:24:36 +09:00
Yukihiro "Matz" Matsumoto 04dffc239b Merge pull request #1841 from ksss/symbol-bool
set bool macro
2014-03-10 22:24:18 +09:00
ksss a53dd33eaa set bool macro 2014-03-10 13:18:34 +00:00
ksss 49a048c544 set bit field for mrb_bool 2014-03-10 13:14:07 +00:00
Yukihiro "Matz" Matsumoto f168e12ba7 Merge pull request #1838 from take-cheeze/reduce_mrb_open_in_test
Reduce mrb_open calls in mrbgem test.
2014-03-10 15:57:58 +09:00
Yukihiro "Matz" Matsumoto 93350ca221 Merge pull request #1839 from cubicdaiya/issues/comment_include_guard
Add comments at end of include guard
2014-03-10 15:54:22 +09:00
cubicdaiya 042c9f95a5 add comments at end of include guard 2014-03-10 12:37:47 +09:00
take_cheeze 77fba20480 reduce mrb_open calls in mrbgem test 2014-03-10 04:45:28 +09:00
Yukihiro "Matz" Matsumoto c740a78e5c Merge pull request #1837 from monaka/pr-add-comments
Add comments to notify files are auto generated.
2014-03-09 19:06:02 +09:00
Masaki Muranaka 5cf46db561 Add comments to notify files are auto generated. 2014-03-09 18:10:27 +09:00
Yukihiro "Matz" Matsumoto 5f787b0cdf Merge pull request #1836 from monaka/pr-use-mrb_str_new_cstr
Use mrb_str_new_cstr() instead of mrb_str_new() with strlen().
2014-03-09 17:12:28 +09:00
Masaki Muranaka 40f57f7b42 Use mrb_str_new_cstr() instead of mrb_str_new() with strlen(). 2014-03-09 16:45:29 +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 bc663549ea Merge pull request #1833 from cremno/use-mrb_str_cat_lit
use mrb_str_cat_lit for literals
2014-03-09 03:01:54 +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
cremno bfc522bcd5 use mrb_str_cat_lit for literals 2014-03-08 18:38:31 +01:00
Yukihiro "Matz" Matsumoto 6423011986 remove invocation of strlen() on buffer of strings; with refactoring 2014-03-09 02:35:49 +09:00
Yukihiro "Matz" Matsumoto ee57789c72 Merge pull request #1831 from monaka/pr-make-type-casts-safer
Make type casts safer
2014-03-09 01:28:31 +09:00
Yukihiro "Matz" Matsumoto 452bf73c23 Merge pull request #1832 from ksss/fix-1823
fix #1823
2014-03-09 01:27:34 +09:00
cremno 8a4faae55e MSVC: add NAN and INFINITY for older versions 2014-03-08 17:25:56 +01:00
cremno f57b9d1576 use NAN and INFINITY
The macro str_to_mrb_float (strto[df]) converts a string to a number,
but these two macros can be used to directly get the special value.

The NAN macro requires quiet NaN support, but so does str_to_mrb_float.

This change also circumvents missing C99 support in Microsoft's C library.
Its (or ISO C90's) strtod doesn't parse "nan" or "inf".
2014-03-08 17:25:07 +01:00
Yukihiro "Matz" Matsumoto 6a23be7805 add data_type check to mruby-random 2014-03-09 01:22:53 +09:00
Yukihiro "Matz" Matsumoto 9a89a82048 refactoring mruby-random 2014-03-09 01:21:57 +09:00
Yukihiro "Matz" Matsumoto ae65c7da58 implement Array#sample in mruby-random gem 2014-03-09 01:03:34 +09:00
Yukihiro "Matz" Matsumoto bd4b59cd04 add "?" specifier to check if preceding optional argument is given 2014-03-09 00:25:59 +09:00
ksss d7b179475b fix #1823 2014-03-08 17:51:21 +09:00
Masaki Muranaka 270d25bf2d Make type casts safer. 2014-03-08 15:53:59 +09:00
Yukihiro "Matz" Matsumoto 058bb18f28 Merge pull request #1828 from take-cheeze/string_embed
Use sizeof(void*) instead of mrb_int size and extend embed string size.
2014-03-08 15:01:42 +09:00
Yukihiro "Matz" Matsumoto 286665c437 Merge pull request #1830 from cremno/pool-fixes
two pool fixes
2014-03-08 13:34:19 +09:00
Yukihiro "Matz" Matsumoto 6f5d234292 Merge pull request #1829 from takkaw/mirb_linenoise
support linenoise in mirb
2014-03-08 13:31:38 +09:00
cremno 307c356c8a pool: use mrb_malloc_simple instead of mrb_malloc 2014-03-07 20:55:11 +01:00
cremno 0c96b936dc MSVC: fix C4146
C4146 (unary minus operator applied to unsigned type, result still
unsigned)
2014-03-07 20:48:44 +01:00
takkaw 0d4bd01cf1 support linenoise in mirb 2014-03-08 01:22:31 +09:00
Yukihiro "Matz" Matsumoto e5e5aadfa8 convert too much from size_t to uint32_t; mrb_sym2name_len() takes size_t* 2014-03-08 00:38:56 +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
U.Nakamura 7591049e89 ignore *.pdb 2014-03-07 23:27:31 +09:00