1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Nobuyoshi Nakada
17d17de0e8
Get rid of redefinition of memcpy on mingw 2020-05-26 16:58:40 +09:00
Koichi Sasada
21991e6ca5 Use RUBY_DEBUG instead of NDEBUG
Assertions in header files slows down an interpreter, so they should be
turned off by default (simple `make`). To enable them, define a macro
`RUBY_DEBUG=1` (e.g. `make cppflags=-DRUBY_DEBUG` or use `#define` at
the very beggining of the file. Note that even if `NDEBUG=1` is defined,
`RUBY_DEBUG=1` enables all assertions.
[Feature #16837]
related: https://github.com/ruby/ruby/pull/3120

`assert()` lines in MRI *.c is not disabled even if `RUBY_DEBUG=0` and
it can be disabled with `NDEBUG=1`. So please consider to use
`RUBY_ASSERT()` if you want to disable them when `RUBY_DEBUG=0`.
2020-05-26 03:21:14 +09:00
卜部昌平
06321ea26c RBIMPL_ATTR_DEPRECATED: disable for GCC10
GCC 10.x seems buggy here.  See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302
2020-05-25 10:17:51 +09:00
Nobuyoshi Nakada
62b47196e4
Added UNREACHABLE_RETURN
To get rid of a void function at the end of non-void function.
2020-05-21 13:31:36 +09:00
卜部昌平
43725c6091 rb_scan_args_set: make it slightly readable
This is a pure refactoring that improves understanding of what is going
on.  Not a big win though.
2020-05-21 09:58:54 +09:00
Samuel Williams
0e3b0fcdba
Thread scheduler for light weight concurrency. 2020-05-14 22:10:55 +12:00
Nobuyoshi Nakada
237bee9d40
Removed extra stringization
Argument of RUBY_ASSERT_FAIL is already stringized message, so no
more extra stringization should be applied.
2020-05-12 10:23:33 +09:00
卜部昌平
4fbb344156 fix sunpro pragma
SunPro's #pragma does_not_return(...) needs an argument.  That does not
fit the attribute syntax we employ.
2020-05-11 16:47:25 +09:00
卜部昌平
534277fa7b rb_str_new: hoist RB_CONSTANT_P out of function
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html says:

> GCC never returns 1 when you call the inline function with a string
> constant or ...

Because rb_str_new and familiy take string constants, it was a bad idea
for them to contain RB_CONSTANT_P.  We should instead do so in
corresponding macros. [ruby-core:98212]
2020-05-11 11:07:37 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
b85fd1d690 mv include/ruby/{impl,internal}
Devs do not love "impl".
2020-05-11 09:24:08 +09:00