| Age | Commit message (Collapse) | Author |
|
The PR was from @cubicdaiya.
|
|
Rename new functions:
- `mrb_convert_type(mrb,val,type,tname,method)`
=> `mrb_type_convert(mrb,val,type,tname,method)`
- `mrb_check_convert_type(mrb,val,type,tname,method)`
=> `mrb_type_convert_check(mrb,val,type,tname,method)`
Old names are defined by macros (support `tname` drop and
`char*` => `mrb_sym` conversion).
|
|
- Integrate `Fixnum` and `Integer`
- Remove `Integral`
- `int / int -> int`
- Replace `mrb_fixnum()` to `mrb_int()`
- Replace `mrb_fixnum_value()` to `mrb_int_value()`.
- Use `mrb_integer_p()` instead of `mrb_fixnum_p()`
|
|
We still have `#define MRB_TT_FIXNUM MRB_TT_INTEGER` for compatibility.
|
|
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT`
- `MRB_USE_FLOAT` => `MRB_USE_FLOAT32`
The former is to use `USE_XXX` naming convention. The latter is to make
sure `float` is 32bit float and not floating point number in general.
|
|
- `mrb_convert_type`
- `mrb_check_convert_type`
Those function no longer take `tname` string representation of desired
type, and take method symbols instead of `const char*` names. This is
incompatible change. I hope no third-party gems use those functions.
|
|
Except for support files e.g. `mruby-test/driver.c`, which are not
target of symbol collection via `rake gensym`.
|
|
|
|
|
|
|
|
- `Fixnum#to_s`, `Fixnum#inspect`
- `Float#to_s`, `Float#inspect`
- `NilClass#to_s`, `NilClass#inspect`
- `FalseClass#to_s`, `FalseClass#inspect`
- `TrueClass#to_s`, `TrueClass#inspect`
- `Time#to_s`, `Time#inspect`
|
|
|
|
This is an experimental changes in Ruby 2.7.
|
|
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
We have added internal convenience method `__to_str` which
does string type check.
The issue #3854 was fixed but fundamental flaw of lack of stack
depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA`
for workaround.
|
|
The ISO standard does not include implicit type conversion using
`to_int`. This implicit conversion often causes vulnerability.
There will be no more attacks like #4120.
In addition, we have added internal convenience method `__to_int` which
does type check and conversion (from floats).
|
|
|
|
|
|
conversion from 'mrb_int' to 'int', possible loss of data
|
|
`mrb_str_buf_new` is an old function that ensures capacity size of
`MRB_STR_BUF_MIN_SIZE` minimum. Usually one need to use
`mrb_str_new_capa` instead.
|
|
When MRB_INT64, valid value range of mrb_int is bigger than double,
which only has 53 bits significant precision.
|
|
Did not update the result from `mrb_check_string_type()` before
string-to-integer conversion.
|
|
This is to avoid segfault when WORD_BOXING is enabled
Reported by https://hackerone.com/brakhane
|
|
|
|
|
|
|
|
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
|
|
|
|
|
|
|
|
instead origin is saved in ICLASS with MRB_FLAG_IS_ORIGIN set.
|
|
|
|
Dr Markus Kuhn published in 1999 an article [1] explaining in details
why we shouldn't use the ASCII grave accent (0x60) as a left quotation.
Backticks have been used most notably to produce nice-looking LaTeX
documents but it doesn't seem to be an issue on modern platforms and
for the oldest ones, there are workarounds as mentioned by Dr Kuhn.
[1]: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
|