| Age | Commit message (Collapse) | Author |
|
`mrb_funcall_id()` takes `mrb_sym` instead of `char*` for a method name.
You can use `MRB_SYM()`/`MRB_QSYM()` to specify the method to call.
|
|
|
|
- The `s` specifier is a string pointer obtained without performing `mrb_str_modify()`, so it cannot be changed.
- The `z` specifier cannot be changed because it is a string pointer obtained by `RSTRING_CSTR()` which returns `const char *`.
|
|
It seems to be unnecessary from mruby-1.0.0 or earlier.
|
|
|
|
* `_Static_assert` can also be used with `-std=gnu99` on GCC >= 4.6.
* `static_assert` can be used on MSVC.
* `static_assert` can be used even on old G++/Clang++ if
`__GXX_EXPERIMENTAL_CXX0X__` is defined.
|
|
The use of `struct` is an idea by @dearblue.
|
|
Note that the home brew version of `mrb_static_assert` only works within
the function body. This reverts commit 8f99689.
|
|
|
|
`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.
|
|
|
|
|
|
`mrb_run` requires to push callinfo stack before calling, which is very
hard from outside of `vm.c`. So there should be virtually no correct
usage of the function, hence the cause of #4488. We removed it.
You can use `mrb_top_run(mrb, proc, self, 0)` instead of
`mrb_run(mrb, proc self)`.
|
|
|
|
The difference between `mrb_singleton_class` and `mrb_singleton_class_ptr`:
- `mrb_singleton_class_ptr` returns `struct RClass*`.
- `mrb_singleton_class_ptr` returns `NULL` on immediate values where
`mrb_singleton_class` raises exceptions.
|
|
|
|
that includes `float.h`. It allows definitions from native headers.
|
|
|
|
To unify the style of messages.
|
|
Keyword arguments can now be retrieved with the `:` specifier and
`mrb_kwargs` data.
For the interface, I referred to CRuby's `rb_get_kwargs()`.
For implementation, I referred to `OP_KARG` or etc.
|
|
This is an experimental changes in Ruby 2.7.
|
|
|
|
* mrb_sym2name -> mrb_sym_name
* mrb_sym2name_len -> mrb_sym_name_len
* mrb_sym2str -> mrb_sym_str
|
|
`MRB_METHOD_TABLE_INLINE` was fragile. It requires `-falign-functions=n`.
On platform that uses higher bits of function pointers, you can use new
`MRB_METHOD_T_STRUCT` configuration macro.
|
|
|
|
|
|
|
|
|
|
|
|
Generate doxygen docs for mruby
|
|
|
|
|
|
Contrary to the name, `mrb_to_str` just checks type, no conversion.
|
|
|
|
This time, the allocated memory comes from the string object, which is
referenced from GC arena. The memory region will be reclaimed when the C
function called from VM is terminated, or the GC arena is restored.
|
|
When I found this function, I expected it to behave the same as the
`alloca(3)` function, but it is accually the `mrb_alloca()` function
does not free the heap until the `mrb_close()` function is called.
Also, even if it is deleted, it can be replaced with the combination
of the `MRB_TT_DATA` object and the `mrb_gv_set()` function if it is
sure necessary.
|
|
|
|
|
|
|
|
|
|
Extract frozen checking to function
|
|
|
|
|
|
`mruby 2.0.1 (2019-4-4)`
|
|
fixes build on OpenBSD.
|
|
Functions to add prototypes to headers:
* mrb_ary_splice()
* mrb_notimplement()
* mrb_vformat()
* mrb_cstr_to_dbl()
* mrb_cstr_to_inum()
Functions to be made `static` (`MRB_API` was not needed):
* mrb_mod_module_function()
* mrb_obj_hash()
* mrb_str_len_to_inum()
Functions to remove `MRB_API` from definitions (referenced from within `libmruby`):
* mrb_mod_cv_defined()
* mrb_mod_cv_get()
* mrb_f_send()
|
|
|
|
Small symbols with all alphanumeric characters (<5) are packed in 32bit
symbol integer a la base64. This means those small symbols are not
listed in `Symbol.all_symbols`.
|
|
In 4174e02, we removed the symbol hash table from `mrb_state` but
`find_symbol` was too slow with linear search. My performance estimation
was wrong. So we implemented a new compact hash table for symbols.
|
|
Use linear search instead. Number of symbols is usually small (<1K), so
we don't need performance boost from hash tables. In our benchmark
measurement, hash tables consumes 790KB for `build/full-debug/mrbtest`.
|