| Age | Commit message (Collapse) | Author |
|
This reverts commit dc51d89ac22acc60b9bfeed87115863565b74085.
|
|
Instead of including `mruby/presym.h` everywhere, we provided the
fallback `mruby/presym.inc` under `include/mruby` directory, and specify
`-I<build-dir>/include` before `-I<top-dir>/include` in `presym.rake`.
So even when someone drops `-I<build-dir>/include` in compiler options,
it just compiles without failure.
|
|
Addressed an issue where existing programs linking `libmruby.a` could only
be built by adding `<build-dir>/include` to compiler's include path.
|
|
Run on pull request only
Using https://www.npmjs.com/package/markdownlint-cli
Lint Markdown for rules:
- MD009/no-trailing-spaces
- MD012/no-multiple-blanks
- MD022/blanks-around-headings
- MD031/blanks-around-fences
- MD032/blanks-around-lists
|
|
|
|
To be also able to build mruby without presym in the future. However,
`MRB_QSYM` has been removed and changed as follows:
### Example
| Type | Symbol | Previous Style | New Style |
|---------------------------|--------|------------------|----------------|
| Operator | & | MRB_QSYM(and) | MRB_OPSYM(and) |
| Class Variable | @@foo | MRB_QSYM(00_foo) | MRB_CVSYM(foo) |
| Instance Variable | @foo | MRB_QSYM(0_foo) | MRB_IVSYM(foo) |
| Method with Bang | foo! | MRB_QSYM(foo_b) | MRB_SYM_B(foo) |
| Method with Question mark | foo? | MRB_QSYM(foo_p) | MRB_SYM_Q(foo) |
| Mmethod with Equal | foo= | MRB_QSYM(foo_e) | MRB_SYM_E(foo) |
This change makes it possible to define, for example, `MRB_IVSYM(foo)` as
`mrb_intern_lit(mrb, "@" "foo")`, which is useful if we support building
without presym in the future.
|
|
Where fixnum overflow can happen.
|
|
- 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()`
|
|
* The `Fixnum` constant is now an alias for the `Integer` class.
* Remove `struct mrb_state::fixnum_class` member.
If necessary, use `struct mrb_state::integer_class` instead.
|
|
|
|
|
|
Except for support files e.g. `mruby-test/driver.c`, which are not
target of symbol collection via `rake gensym`.
|
|
|
|
- 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 *`.
|
|
|
|
|
|
'stdio.h' is included in 'mruby.h' ('mrbconf.h').
However, keep 'stdio.h' used by mruby-test.
|
|
|
|
|
|
|
|
shuujii/add-mrb_num_args_error-for-wrong-number-of-arguments-error
Add `mrb_num_args_error()` for "wrong number of arguments" error
|
|
To unify the style of messages.
|
|
It is writing side by side with the original authors.
|
|
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
|
|
|
|
|
|
`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`
|
|
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.
|
|
|
|
Because it always allocate new string. Replace with the followings:
- Use `RSRING_PTR` if string is guaranteed to be null-terminated.
- Use `mrb_string_value_cstr` or `mrb_get_args("z")` if return value isn't
modified.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`mrb_raisef()` only takes `%S` specifier. If you don't have extra
arguments, use `mrb_raise()`.
|
|
|
|
|
|
If your system has sa_len but is not BSD-derived, define HAVE_SA_LEN=1
on mrbgem.rake or build_config.rb.
|
|
When we have "struct sockaddr_un *s_un", we could not assume *s_un
points to a memory region which size is at least sizeof(*s_un).
Even worse, it may be shorter than sizeof(struct sockaddr) on some
systems.
|
|
ref: https://github.com/iij/mruby-socket/issues/45
|
|
To avoid conflicts with multiple definitions of inet_ntop and inet_pton if compiled with # define _WIN32_WINNT _WIN32_WINNT_VISTA
C:/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libWs2_32.a(dghfs00169.o):(.text+0x0): multiple definition of `inet_pton'
722C:/projects/iss/mruby/build/host/lib/libmruby.a(socket.o):C:/projects/iss/mruby/mrbgems/mruby-socket/src/socket.c:80: first defined here
define _WIN32_WINNT _WIN32_WINNT_VISTA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|