| Age | Commit message (Collapse) | Author |
|
|
|
|
|
shuujii/mrb_str_modify_keep_ascii-can-embed-one-more-byte
`mrb_str_modify_keep_ascii` can embed one more byte
|
|
|
|
This reverts commit 3dc8d9d7b3d0be2f91fa050a13e3b422500df628.
|
|
`mrb_gc_destroy` may call other mruby API functions from the finalizers.
So call that function first.
|
|
|
|
The condition to make an embedded string was incorrect. Because there were
several similar codes, extracted into `RSTR_EMBEDDABLE_P` macro.
|
|
shuujii/remove-monkey-patches-for-Ruby-1.9-or-earlier
Remove monkey patches for Ruby 1.9 or earlier
|
|
shuujii/enumerable-reject-etc.-should-return-Enumerable-without-block
`Enumerable#reject`, etc. should return `Enumerable` without block
|
|
|
|
Avoid premature overflow in Complex#abs and Complex#/
|
|
|
|
Math.hypot avoids premature overflow and underflow
|
|
|
|
shuujii/improve-MiniRake-rule-enhancement-for-Rake-compatibility
Improve MiniRake rule enhancement for Rake compatibility
|
|
Support pathmap notation, recursive dependencies search, and so on.
|
|
Contrary to the name, `mrb_to_str` just checks type, no conversion.
|
|
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete
`mrb_string_cstr`: new function to retrieve NULL terminated C string
`RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
|
|
|
|
|
|
|
|
shuujii/add-mrb_noreturn-to-cmperr-in-src-numeric.c
Add `mrb_noreturn` to `cmperr()` in `src/numeric.c`
|
|
|
|
|
|
|
|
shuujii/use-new-specifiers-modifiers-of-mrb_vfromat
Use new specifiers/modifiers of `mrb_vfromat()`
|
|
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in
my environment than before the introduction of new specifiers/modifiers
(5116789a) with this change.
------------+-------------------+-------------------+--------
BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO
------------+-------------------+-------------------+--------
mruby | 593416 bytes | 593208 bytes | -0.04%
libmruby.a | 769048 bytes | 767264 bytes | -0.23%
------------+-------------------+-------------------+--------
BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613,
so I put it back.
|
|
shuujii/use-mrb_int-instead-of-to_int-in-mruby-numeric-ext
Use `mrb_int()` instead of `to_int()` in `mruby-numeric-ext`
|
|
Add constants for floating point number
|
|
shuujii/change-second-argument-to-%l-of-mrb_vformat-to-size_t-from-mrb_int
Change second argument to `%l` of `mrb_vformat()` to `size_t` from `mrb_int`
|
|
|
|
|
|
- `size_t` is more commonly used.
- `len` argument of `mrb_str_new()` is `size_t`.
NOTE:
The test for `%l` is temporarily disabled because adding a new type to
`mrbgems/mruby-test/vformat.c` causes an error (memory error?) on Visual
Studio 2017 in AppVeyor.
|
|
Fix `mrb_vformat("%f")` with `MRB_USE_FLOAT`
|
|
Suppress compiler warnings for mruby-time; fix #4600
|
|
It potentially not work when `mrb_float` is `float` because `float` variable
in variable length arguments is promoted to `double`.
Also I fixed build with `MRB_WITHOUT_FLOAT`.
|
|
Warnings:
- If `MRB_TIME_T_UINT` is defined, the compiler issues a warning with an
integer comparison of different signs.
- It is mentioned that the `usec` variable passed to the
`mrb_to_time_t()` function may not be initialized
|
|
shuujii/change-the-mrb_vformat-specifier-%d-for-int
Change the `mrb_vformat` specifier `%d` for `int`
|
|
It potentially breaks, for example, in the case of `mrb_int` is 64-bit
and more smaller type is passed by `%d`. In fact, the problem could
become apparent when I used `%d` to `backtrace_location::lineno` in
`src/backtrace.c:mrb_unpack_backtrace()` on AppVeyor.
Therefore, change `%d` for `int` (not `mrb_int`) so that it can be
used mostly without casting.
|
|
shuujii/add-new-specifiers-modifiers-to-format-string-of-mrb_vfromat
Add new specifiers/modifiers to format string of `mrb_vfromat()`
|
|
Format sequence syntax:
%[modifier]specifier
Modifiers:
----------+------------------------------------------------------------
Modifier | Meaning
----------+------------------------------------------------------------
! | Convert to string by corresponding `inspect` instead of
| corresponding `to_s`.
----------+------------------------------------------------------------
Specifiers:
----------+----------------+--------------------------------------------
Specifier | Argument Type | Note
----------+----------------+--------------------------------------------
c | char |
d,i | mrb_int |
f | mrb_float |
l | char*, mrb_int | Arguments are string and length.
n | mrb_sym |
s | char* | Argument is NUL terminated string.
t | mrb_value | Convert to type (class) of object.
v,S | mrb_value |
C | struct RClass* |
T | mrb_value | Convert to real type (class) of object.
Y | mrb_value | Same as `!v` if argument is `true`, `false`
| | or `nil`, otherwise same as `T`.
% | - | Convert to percent sign itself (no argument
| | taken).
----------+----------------+--------------------------------------------
This change will increase the binary size, but replacing all format strings
with new specifiers/modifiers will decrease the size because it reduces
inline expansion of `mrb_obj_value()`, etc. at the caller.
|
|
shuujii/fix-UTC-offset-representation-in-Time-to_s-on-some-environments
Fix UTC offset representation in `Time#to_s` on some environments; ref #4604
|
|
Use own implementation to calculate UTC offset on Visual Studio 2015 or
earlier or MinGW because `strftime("%z")` on these environments does not
conform C99.
|
|
`MRB_INT_MIN` is the only integer value that has no corresponding
positive integer value (i.e. `-MRB_INT_MIN` = `MRB_INT_MIN`).
|
|
|
|
|
|
|
|
|
|
Refine message to `skip` in nested `assert`
|