Commit Graph

27 Commits

Author SHA1 Message Date
cubicdaiya bf3f45fc70 Use mrb_int instead of int 2014-03-25 22:33:53 +09:00
cubicdaiya 51947f132b Use bool-macro instead of magic-number 2014-03-22 09:55:48 +09:00
take_cheeze c73f8d4def move summary of mrbgems in default gembox to its spec 2014-03-17 00:34:24 +09:00
cremno 1b6a4fb5a2 add MRB_INT_BIT 2014-03-11 20:14:18 +01: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
Yukihiro "Matz" Matsumoto 1f134d723c cancel 313f6b; add fallthrough comment 2014-02-28 18:55:30 +09:00
chasonr 5e5ee841a1 Implement sprintf("%c") for UTF-8.
* sprintf("%c") is changed to accept a string for which String#size returns
  1, even if it is longer than one byte, and to convert a Fixnum via
  Fixnum#chr (possibly returning more than one byte).  Thus, if the UTF-8
  gem is in use, a character will be understood as a single UTF-8 character.

* The change to sprintf depends on the implementation of Fixnum#chr added
  to mrbgems/mruby-string-utf8/src/string.c.

This should work with any other gem that implements a multibyte encoding, as
long as it implements String#size and Fixnum#chr as appropriate.
2014-02-26 20:18:26 -05:00
Yukihiro "Matz" Matsumoto 313f6b5997 forget to break in the switch statement 2014-02-27 08:23:32 +09:00
cubicdaiya 94c5a5ee73 use mrb_str_new_lit instead of mrb_str_new for C string literals 2014-02-26 02:23:50 +09:00
cremno bb25d42d0d add missing declaration of mrb_str_format 2014-01-31 01:34:20 +01:00
cremno 18433731ed remove various preprocessor conditionals
- HAVE_IEEEFP_H is nowhere defined or needed at all
- FreeBSD < 4 is unsupported since years
- MSVC workaround (around what exactly?)
2014-01-02 07:33:33 +01:00
Tomoyuki Sahara 116f75a8ce "spec.author" is better for single-author gems.
"spec.author=" expects a String represents a single author.
"spec.authors=" expects an Array which is a list of multiple authors.

http://guides.rubygems.org/specification-reference/
2013-07-23 10:09:24 +09:00
Cremno 8728837478 Visual Studio 2013 support + strtof + inline
- VC12 has better C99 library support due to C++11
- defined strtof for VC11 or older
- define "inline" only if the C compiler is used
2013-06-27 12:18:35 +02:00
Julien Ammous 8057eb935c removed unused variables / assigns never used 2013-05-18 14:13:04 +02:00
Yukihiro "Matz" Matsumoto fad8b1cefa change mrb_warn to get mrb_state and %S formatter 2013-05-10 22:09:02 +09:00
Yukihiro "Matz" Matsumoto 30d580ecbc rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206 2013-04-25 09:47:36 +09:00
Masaki Muranaka c260ef894e Rename mrb_fix2str() to mrb_fixnum_to_str(). This is for naming consistency. 2013-03-29 22:19:26 +09:00
Masaki Muranaka 710f625254 Remove mrb_flt2big() as there is no bignum in the core.
Add new API mrb_flo_to_fixnum(). You can replace mrb_flt2big() to mrb_flo_to_fixnum() with few modifications.
2013-03-29 22:19:26 +09:00
Masaki Muranaka 05ad6902fd Remove API mrb_string_value(). There have mrb_str_to_str() in the core. And mrb_string_value() is no merit to keep using. 2013-03-29 18:01:25 +09:00
Masaki Muranaka a01e968cdb Remove limits.h from numeric.h. Add limits.h to some C files. 2013-03-29 10:06:40 +09:00
Masaki Muranaka 384db0d809 Fix format for new mrb_raisef(). 2013-03-28 21:35:56 +09:00
Yukihiro "Matz" Matsumoto e53628eb9d Merge pull request #984 from monaka/pr-make-mrb_str_new2-obsolete
Remove mrb_str_new2().
2013-03-12 17:25:23 -07:00
Masaki Muranaka 018db2daac Use suitable types for variables. 2013-03-12 21:12:05 +09:00
Masaki Muranaka be506de3fc Remove mrb_str_new2(). Use mrb_str_new_cstr() instead.
Make mrb_str_new_cstr() accept NULL pointer. It generates 0byte strings by NULL pointer.
2013-03-12 17:54:40 +09:00
Masaki Muranaka 97136825e2 Separate Kernel#sprintf support from mruby core. It's moved to mrbgems. 2013-03-04 23:04:39 +09:00
Masaki Muranaka a5bc5b2574 Move src/sprintf to mrbgems/mruby-sprintf/src/ 2013-03-04 22:27:23 +09:00