summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/src/complex.c
AgeCommit message (Collapse)Author
2020-10-12Silence warnings from implicit integer conversions.Yukihiro "Matz" Matsumoto
Caused from combination of `mrb_int`, `int` and `size_t`..
2020-10-12Rename float configuration option names.Yukihiro "Matz" Matsumoto
- `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.
2020-10-12Use functions that take symbols to reduce string litrals in C.Yukihiro "Matz" Matsumoto
2020-06-20Add `mrb_get_arg1()` that retrieves single (and only) argument.Yukihiro "Matz" Matsumoto
`mrb_get_arg1()` raises `ArgumentError` if the method does not receive one argument. And replaces all `mrb_get_args(mrb, "o", &arg)` by the new function.
2019-08-09Avoid overflow and underflow in Complex#/Ray Chason
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
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.
2019-07-24Call `MRB_SET_INSTANCE_TT` for `Complex` and `Rational`.Yukihiro "Matz" Matsumoto
2019-07-22Check conflicts with `Complex` and `MRB_WITHOUT_FLOAT`; ref #4576Yukihiro "Matz" Matsumoto
The Complex class needs `mrb_float` so that it does not work with `MRB_WITHOUT_FLOAT` anyway.
2019-06-05Fix not frozen in `Complex` method by `RData`dearblue
Object allocation was separated, and initialization was made common.
2019-06-05Fix memory leak in `Complex` method by `RData`dearblue
If `Data_Wrap_Struct()` raises a `NoMemoryError` exception, it will leak memory if it does `mrb_malloc()` first.
2019-05-26Add `Complex.rect`KOBAYASHI Shuji
2019-05-26Remove some overhead from methods defined in Ruby in Complex.Yukihiro "Matz" Matsumoto
2019-05-23Freeze `Rational` and `Complex` objectsKOBAYASHI Shuji
2019-05-21Use `MRB_TT_ISTRUCT` for `Complex` numbers if possible.Yukihiro "Matz" Matsumoto
2019-05-21Implements part of `Complex` class in C.Yukihiro "Matz" Matsumoto