| Age | Commit message (Collapse) | Author |
|
ref #4576 and ref #4947
* Need MRBAPI functions without `MRB_DISABLE_STDIO`:
* mrbgems/mruby-bin-debugger
* mrbgems/mruby-bin-mirb
* mrbgems/mruby-bin-mrbc
* mrbgems/mruby-bin-mruby
* mrbgems/mruby-bin-strip
* Need `stdio.h`:
* mrbgems/mruby-io
* mrbgems/mruby-print
* Need `snprintf()` in `stdio.h`:
* mrbgems/mruby-pack
* mrbgems/mruby-sprintf
|
|
'stdio.h' is included in 'mruby.h' ('mrbconf.h').
However, keep 'stdio.h' used by mruby-test.
|
|
|
|
#### Before this patch:
```console
Fail: mruby-bin-debugger(print) error (mrbgems: mruby-bin-debugger)
- Assertion[2]
Expected true to be false.
```
#### After this patch:
```console
Fail: mruby-bin-debugger(print) error (mrbgems: mruby-bin-debugger)
- Assertion[2]
Expected "$2 = undefined method 'bar' (NoMethodError)\n" to be start_with? "$2 = (eval):2: undefined method".
```
|
|
|
|
#### Before this patch:
```
$ echo 'p true' | bin/mrdb /dev/null
(/dev/null:1) mruby application exited.
FrozenError: can't modify frozen String
(-:0)
```
#### After this patch:
```
$ echo 'p true' | bin/mrdb /dev/null
(/dev/null:1) $1 = true
(/dev/null:1)
```
|
|
* mrb_sym2name -> mrb_sym_name
* mrb_sym2name_len -> mrb_sym_name_len
* mrb_sym2str -> mrb_sym_str
|
|
|
|
The purpose is to clarify the error if there is a needed/conflicts
configuration at compile time.
|
|
The addresses for packed inline symbols reference `mrb->symbuf` that
could be overridden by the later call of `mrb_sym2name_len`. Since
file names in call stack information are kept as symbols, keeping the
address in the C structures could cause problems like #4342.
This changes small incompatible changes in function prototypes:
* `mrb_parser_get_filename`: return value changed to `mrb_sym`.
* `mrb_debug_get_filename`: add `mrb_state*` as a first argument.
* `mrb_debug_get_line`: ditto.
I believe above functions are almost internal, and no third-party
mrbgem use them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changes applied:
- Removing "register" keyword
- Fixing const pointer to pointer assignments
- Adding type casts to rb_malloc calls
|
|
Now the method tables (in classes/modules and caches) keeps C function
pointers without wrapping in `struct RProc` objects. For the sake of
portability, `mrb_method_t` is represented by the struct and union, but
if the most significant bit of the pointer is not used by the platform,
`mrb_method_t` should be packed in `uintptr_t` to reduce memory usage.
`MRB_METHOD_TABLE_INLINE` is turned on by default for linux.
|
|
|
|
|
|
The change removes several internal instance variables used by
class name management. The variables `__classid__` and `__classpath__`
are no longer available. `__outer__` is used only for unnamed outer
classes/modules (and will be removed after they are named).
[Important note]
Along with this change we removed several public functions.
- mrb_class_outer_module()
- mrb_class_sym()
We believe no one have used those functions, but if you do, please
ask us for the workaround.
|
|
|
|
|
|
|
|
in mrbgems/mruby-bin-debugger.
|
|
|
|
Fix warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As detected in a Coverity scan. https://scan8.coverity.com/reports.htm#v26153/p11375/fileInstanceId=6844472&defectInstanceId=2516000&mergedDefectId=75866
|
|
|
|
Here are suppressed warnings:
src/fmt_fp.c: In function 'fmt_fp':
src/fmt_fp.c:124:16: warning: initialization discards 'const' qualifier from pointer target type
char *ss = (t&32)?"inf":"INF";
^
src/fmt_fp.c:125:17: warning: assignment discards 'const' qualifier from pointer target type
if (y!=y) ss=(t&32)?"nan":"NAN";
^
mrbgems/mruby-string-ext/src/string.c: In function 'mrb_str_succ_bang':
mrbgems/mruby-string-ext/src/string.c:302:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "1";
^
mrbgems/mruby-string-ext/src/string.c:305:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "a";
^
mrbgems/mruby-string-ext/src/string.c:308:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "A";
^
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c: In function 'main':
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c:213:13: warning: assignment discards 'const' qualifier from pointer target type
cmdline = args.cmdline ? args.cmdline : "-";
^
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c: In function 'print_breakpoint':
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type
char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE};
^
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type
|
|
|
|
mrdb, mirb: Add fflush() so that a external program can read output imme...
|
|
How to reproduce:
```
cat a.rb
Proc.new { 1 }.call
echo step | mrdb a.rb
```
|
|
Use sizeof() instead of strlen().
|
|
* `mrb_show_version()`
* `mrb_show_copyright()`
|
|
|
|
When mrb_open() is called again, it is not checked.
|
|
|
|
|
|
Before fix:
```
$ mrdb c:\tmp\b.rb
(c:\tmp\b.rb:1) break c:\tmp\b.rb:3
Class name 'c' is invalid.
```
After fix:
```
$ mrdb c:\tmp\b.rb
(c:\tmp\b.rb:1) break c:\tmp\b.rb:3
Breakpoint 1: file c:\tmp\b.rb, line 3.
```
|
|
|