Nobuyoshi Nakada
702a58e9e5
Remove duplicate type qualifiers
...
`rb_encoding` is defined as `const OnigEncodingType`.
Fix lots of C4114 warnings for each files by MSVC.
2021-10-06 14:01:43 +09:00
Nobuyoshi Nakada
cd182c5ee1
Adjust types to rb_enc_left_char_head
...
I dislike unnatural casts.
2021-10-05 17:14:29 +09:00
卜部昌平
f032c09bca
rb_enc_left_char_head(): take void*
...
Nobu doesn't like (char*) cast.
2021-10-05 14:18:23 +09:00
卜部昌平
5112a54846
include/ruby/encoding.h: convert macros into inline functions
...
Less macros == huge win.
2021-10-05 14:18:23 +09:00
卜部昌平
312668cf03
split include/ruby/encoding.h
...
2,291 lines are too much! include/ruby/encoding.h became the biggest
header file once it had doxygen comments. Let us split it into smaller
parts, so that we can better organise their contents.
2021-10-05 14:18:23 +09:00
卜部昌平
2fa4715bf2
rb_ractor_shareable_p(): fix doxygen
...
My bad. The document is clearly broken. Maybe I pressed my delete key
too much. [ci skip]
2021-10-05 14:18:23 +09:00
卜部昌平
90f2ab9d62
rb_fiber_raise(): add doxygen
...
Must not be a bad idea to improve documents.
2021-09-30 20:55:23 +13:00
Nobuyoshi Nakada
f7ffe9dbde
Introduce RBIMPL_NONNULL_ARG macro
...
Runtime assertion for the argument declared as non-null.
This macro does nothing if `RBIMPL_ATTR_NONNULL` is effective,
otherwise asserts that the argument is non-null.
2021-09-27 14:47:52 +09:00
Nobuyoshi Nakada
63297c2ca4
Align the implementation precedences with rb_atomic_t definition
...
On MinGW, where both of Win32 API and GCC built-ins are available,
the mismatch of implementations to the definition caused lots of
warnings.
2021-09-24 10:11:32 +09:00
卜部昌平
0dea31c437
RBIMPL_ATTR_NOALIAS: not until LLVM 12
...
I observed CI failures.
https://github.com/ruby/ruby/actions/runs/1240165911
It turns out that RBIMPL_ATTR_NOALIAS was not mature before. Skip
using it for old clang, and everything work as expected.
2021-09-22 16:37:13 +09:00
卜部昌平
ecaf3a391d
include/ruby/atomic.h: rework
...
Reduce macros to do the same things in inline functions instead. This
way assertions can be made granular.
2021-09-22 16:37:13 +09:00
Samuel Williams
88ba5fe547
Expose rb_fiber_raise and tidy up the internal implementation.
2021-09-20 18:30:51 +12:00
卜部昌平
63ab2fedc8
include/ruby/atomic.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-15 09:25:23 +09:00
Nobuyoshi Nakada
b568e6a130
Suppress deprecated rb_iterate declaration warnings in C++
...
Apply commit:733ffa74cd32a5c11ff744a5490782daa00ff1ae again.
2021-09-11 17:54:11 +09:00
Nobuyoshi Nakada
cd829bb078
Remove printf family from the mjit header
...
Linking printf family functions makes mjit objects to link
unnecessary code.
2021-09-11 08:41:32 +09:00
卜部昌平
c39dd708b5
suppress GCC's -Wmissing-attribute
...
I was not aware of this because I use clang these days.
2021-09-10 20:00:06 +09:00
卜部昌平
6522b51ce5
rb_ary_new_from_values: can take NULLs
...
Explicit check done at runtime.
2021-09-10 20:00:06 +09:00
卜部昌平
dddc618d30
suppress GCC's -Wsuggest-attribute=format
...
I was not aware of this because I use clang these days.
2021-09-10 20:00:06 +09:00
卜部昌平
fd12bc1896
ruby_scan_oct, ruby_scan_hex: are not pure
...
Silly bug, they write back consumed bytes through passed pointers. Must
never be pure functions.
ruby_scan_oct does not refer any static variables so it can still be
__declspec(noalias), while ruby_scan_hex is not because it reads from
ruby_digit36_to_number_table.
2021-09-10 20:00:06 +09:00
卜部昌平
4f03930d04
ruby_cleanup: fix MSVC compile error
...
See https://ci.appveyor.com/project/ruby/ruby/builds/40686153/job/1wihxw5m5kybtohj
2021-09-10 20:00:06 +09:00
卜部昌平
676073b62e
include/ruby.h: skip doxygen
...
Everything defined in this header file are for backwards compatibility
only. No one practically need them any longer. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
4702b59f21
include/ruby/backward.h: skip doxygen
...
There is nothing interesting here. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
6420db8ab7
include/ruby/debug.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
1563526edf
include/ruby/defines.h: add doxygen
...
The only thing that remains in this file which is still worth
documenting is the RUBY macro. Everything else were split into many
files in
1ff4cee2b1
[ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
6e8e2b467b
forgot to delete a redundant comment
2021-09-10 20:00:06 +09:00
卜部昌平
3ca688aeb0
include/ruby/encoding.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
84b96298b3
include/ruby/fiber/scheduler.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
809138fe4b
include/ruby/io.h: add doxyen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
6204b0dd99
include/ruby/memory_view.h: add doxygen
...
I'm just applying doc/memory_view.md as a doxygen comment. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
5a79439a68
include/ruby/missing.h: skip doxygen
...
We don't want to document e.g. M_PI, which is an ISO C thing.
2021-09-10 20:00:06 +09:00
卜部昌平
56c0475036
include/ruby/ractor.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
2c4dccad33
include/ruby/random.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
1c9106da8b
include/ruby/re.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
4c14c55505
include/ruby/regex.h: skip doxygen
...
It seems this is a part of Onigmo's API, not Ruby's.
2021-09-10 20:00:06 +09:00
卜部昌平
e18bc14a05
include/ruby/ruby.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
4912260b70
include/ruby/subst.h: skip doxygen
...
Nothing worth documenting in this file. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
a50287ab03
include/ruby/thread.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
53e0d7eec7
include/ruby/thread_native.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
eb39497ecf
include/ruby/util.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
99dd95806d
include/ruby/version.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
072d74cc7a
include/ruby/vm.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
ba814a5aa3
include/ruby/backward/2/assume.h: add doxygen
...
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
5107a6bf12
include/ruby/backward/2/attributes.h: skip doxygen
...
These macros are for backwards compatibility. No longer used in our
public header files. People can safely forget about them.
[ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
07240056f9
include/ruby/backward/2/bool.h: skip doxygen
...
It's 21st century, right? Just forget about them. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
c0b5d95cc0
include/ruby/backward/2/gcc_version_since.h: skip doxygen
...
It seems no public APIs depend on this macro any longer. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
5868ebf46e
include/ruby/backward/2/inttypes.h: skip dpxygen
...
These macros need not be documented methinks. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
0f9cf6d4d0
include/ruby/backward/2/limits.h: skip doxygen
...
For instane CHAR_BIT is an ANSI C macro which should be documented in
other places than Ruby (and the definition in this file must work
exactly identical to that of standard one). [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
7ead69068e
include/ruby/backward/2/long_long.h: add doxygen
...
Might want to delete LONG_LONG macro but for the time being let us
describe what on earth it is. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
f05dc8b44a
include/ruby/backward/2/r_cast.h: skip doxygen
...
Nobody practically uses this file. Please just don't remember.
[ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
e5a1efb72a
include/ruby/backward/2/rmodule.h: skip doxygen
...
These macros are considered archaic. [ci skip]
2021-09-10 20:00:06 +09:00