Commit Graph

4991 Commits

Author SHA1 Message Date
ksss 58a5e832d9 fix sym_intern argument type 2014-03-11 09:12:56 +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
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
cubicdaiya 042c9f95a5 add comments at end of include guard 2014-03-10 12:37:47 +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 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 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
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
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
Yukihiro "Matz" Matsumoto aa4f3c79ef reduce integer type complexity from int/size_t/uint32_t by unifying them to uint32_t; close #1778 2014-03-07 20:30:42 +09:00
Yukihiro "Matz" Matsumoto ac8d04fb6c Merge pull request #1820 from ksss/string-embed
Embed small string
2014-03-07 18:51:32 +09:00
Yukihiro "Matz" Matsumoto fe1b4cea41 Hash#== and eql? should not return fixnum; ref #1823 2014-03-07 18:40:10 +09:00
ksss cab1f734ef Fix behavior Hash#eql? 2014-03-07 11:08:24 +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
cubicdaiya 016d3b9394 fix off-by-one error in attrsym
The allocation size for null-terminated character is lacking.
In actual, it is no problem in most case
because codegen_palloc allocates more a memory size than required size.
2014-03-05 11:20:39 +09:00
cubicdaiya ebe4711df8 fix off-by-one error in String#rindex(fixnum)
null-terminated string should not be included in search targets.
2014-03-04 21:58:47 +09:00
cubicdaiya 019d15c3ee Use mrb_exc_new_str_lit widely 2014-03-04 02:45:53 +09:00
Yukihiro "Matz" Matsumoto 18f0fcb0c7 add new macros for MRB_STR_SHARED operations, based on 0f7aecf from @ksss; ref #1782 2014-03-04 01:33:58 +09:00
Yukihiro "Matz" Matsumoto 369c6c3649 Kernel#send does not use mrb_funcall anymore for most cases; ref #1680 2014-03-03 13:31:29 +09:00
Yukihiro "Matz" Matsumoto 9a92b40aaf rescue clause should understand splats; close #1786 2014-03-03 13:25:13 +09:00
Yukihiro "Matz" Matsumoto 7721463a35 add const to char* to pacify warnings for string litral to char* conversion 2014-03-02 00:59:12 +09:00
take_cheeze b98890a4b7 clear exc_catched before jumping to L_RAISE 2014-03-01 20:53:31 +09:00
take_cheeze 54f9ca36fd define __STDC_* macros in y.tab.cxx too 2014-03-01 20:05:31 +09:00
take_cheeze fad4b578e1 wrap scope with do {} while() 2014-03-01 20:05:31 +09:00
take_cheeze 86831d5465 move jmpbuf_id to generated file 2014-03-01 20:05:30 +09:00
take_cheeze 1985f1ace9 fix compile error of min/max macro 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
Yukihiro "Matz" Matsumoto 8e170ce915 exception in fiber should make resume to raise in parent fiber context; close #1765 2014-03-01 12:58:31 +09:00
Yukihiro "Matz" Matsumoto 5f93759158 Merge branch 'issues/comment_style' of https://github.com/cubicdaiya/mruby into cubicdaiya-issues/comment_style 2014-03-01 10:52:46 +09:00
Yukihiro "Matz" Matsumoto 78f2902c06 need to initialize flags for pooled strings; close #1768 2014-03-01 10:48:22 +09:00
Yukihiro "Matz" Matsumoto 5fb8fa5a81 add _FLAG to SET_SHARED macros; ref #1750 2014-03-01 10:26:21 +09:00
Yukihiro "Matz" Matsumoto fca90a43c7 Merge branch 'array-shared-macro' of https://github.com/ksss/mruby into ksss-array-shared-macro 2014-03-01 10:19:55 +09:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
Yukihiro "Matz" Matsumoto 6bd3d88edd support break from fiber block; fix #1766 2014-02-28 18:43:35 +09:00
Yukihiro "Matz" Matsumoto 03fde35760 restore proc after restoring from fiber; ref #1766 2014-02-28 12:50:32 +09:00
cubicdaiya 8336072e86 fix SEGV bug for mrb_str_new_static
mrb_str_new_static causes seg-fault when 3rd argument is negative.
2014-02-28 02:07:09 +09:00
Yukihiro "Matz" Matsumoto 25822f2430 Merge pull request #1762 from cubicdaiya/issues/mrb_str_new_bug
fix SEGV bug for mrb_str_new
2014-02-28 01:44:09 +09:00