summaryrefslogtreecommitdiff
path: root/include/ruby/backward
AgeCommit message (Collapse)Author
2023-03-06Remove obsoleted MJIT_HEADER macroTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7461
2023-02-08Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END` Notes: Merged: https://github.com/ruby/ruby/pull/7268
2022-02-19Check if `__assume` is supportedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-19Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`Nobuyoshi Nakada
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just a flag now, and redefined in ruby/backward/2/assume.h then. Notes: Merged: https://github.com/ruby/ruby/pull/5577
2021-09-10include/ruby/backward/2/assume.h: add doxygen卜部昌平
Must not be a bad idea to improve documents. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/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] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/bool.h: skip doxygen卜部昌平
It's 21st century, right? Just forget about them. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/gcc_version_since.h: skip doxygen卜部昌平
It seems no public APIs depend on this macro any longer. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/inttypes.h: skip dpxygen卜部昌平
These macros need not be documented methinks. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/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] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/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] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/r_cast.h: skip doxygen卜部昌平
Nobody practically uses this file. Please just don't remember. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/rmodule.h: skip doxygen卜部昌平
These macros are considered archaic. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/stdalign.h: add doxygen卜部昌平
Must not be a bad idea to improve documents. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/2/stdarg.h: add doxygen卜部昌平
Must not be a bad idea to improve documents. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/cxxanyargs.hpp: addo doxygen卜部昌平
Must not be a bad idea to improve documents. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10include/ruby/backward/cxxanyargs.hpp: suppress doxygen warning卜部昌平
rb_cFiber is not visible from extension libraries, hence intentionally not documented. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10template/Doxyfile.tmpl: add alias卜部昌平
This enables me to write `@shyouhei` in C comments without complained by doxygen that @shyouhei is an unknown special command. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-10sed -i 's/. They/. They/'卜部昌平
Truly editorial fix for comments. This works better with Emacs' set-justification-full function. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-08-09VC warns the same attribute used more than onceNobuyoshi Nakada
2021-08-09Rename rb_iterate to get rid of name clash on Sun CNobuyoshi Nakada
2021-08-09Deprecate rb_iterate in C++Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4720
2021-08-09Suppress deprecated rb_iterate declaration warnings in C++Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4720
2021-05-04HAVE_* macros should not be defined with value 0Benoit Daloze
* See [Feature #17752] Notes: Merged: https://github.com/ruby/ruby/pull/4428
2021-04-26Fix some typos by spell checkerRyuta Kamizono
Notes: Merged: https://github.com/ruby/ruby/pull/4414
2021-02-14Make global ruby namespace usage explicitMarvin Schmidt
If the use of the ruby namespace isn't prepended by `::` to make it explicit that the global ruby namespace is referenced here, it can clash with other non-global namespace named ruby, e.g. ``` // declaration namespace myproject { namespace ruby { // my ruby classes } } // implementation using namespace myproject; [...] rb_define_method(...); [...] ``` leads to the following error: ``` ../ruby/choice.cc: In function 'void {anonymous}::do_register_choice()': ../ruby/choice.cc:342:9: error: reference to 'ruby' is ambiguous 342 | rb_define_method(c_choices, "each", RUBY_FUNC_CAST(&choices_each), 0); | ^~~~~~~~~~~~~~~~ In file included from ../ruby/choice.cc:20: ../ruby/paludis_ruby.hh:53:15: note: candidates are: 'namespace paludis::ruby { }' 53 | namespace ruby | ^~~~ In file included from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/backward/2/stdalign.h:23, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/defines.h:77, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/ruby.h:23, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby.h:38, from ../ruby/paludis_ruby.hh:44, from ../ruby/choice.cc:20: /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/internal/stdalign.h:92:11: note: 'namespace ruby { }' 92 | namespace ruby { | ^~~~ In file included from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/internal/anyargs.h:83, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby/ruby.h:24, from /usr/x86_64-pc-linux-gnu/include/ruby-3.0/ruby.h:38, from ../ruby/paludis_ruby.hh:44, from ../ruby/choice.cc:20: ../ruby/choice.cc:342:9: error: '::define' has not been declared 342 | rb_define_method(c_choices, "each", RUBY_FUNC_CAST(&choices_each), 0); | ^~~~~~~~~~~~~~~~ ../ruby/choice.cc:344:9: error: reference to 'ruby' is ambiguous 344 | rb_define_method(c_choices, "find_by_name_with_prefix", RUBY_FUNC_CAST(&choices_find_by_name_with_prefix), 1); | ^~~~~~~~~~~~~~~~ ``` Notes: Merged: https://github.com/ruby/ruby/pull/4185 Merged-By: nobu <nobu@ruby-lang.org>
2020-08-27include/ruby/backward/2/rmodule.h: deprecate卜部昌平
Only one function in only one file uses contents of this public header. That is not a wise idea. Let's just free the header's soul. Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27include/ruby/backward/2/r_cast.h: deprecate卜部昌平
Remove all usages of RCAST() so that the header file can be excluded from ruby/ruby.h's dependency. Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27improve deprecation warning卜部昌平
We should not recommend RBIMPL_*. Notes: Merged: https://github.com/ruby/ruby/pull/3341
2020-08-27DEPRECATED_TYPE: is deprecated卜部昌平
Nobody uses this macro any longer. Notes: Merged: https://github.com/ruby/ruby/pull/3341
2020-08-27git rm include/ruby/backward/rubyio.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3344
2020-08-27git rm include/ruby/backward/rubysig.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3343
2020-08-27git rm include/ruby/backward/{st,util}.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3345
2020-08-27git rm include/ruby/backward/classext.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3340
2020-08-27git rm include/ruby/backward/2/extern.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3338
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s/ruby3/rbimpl/g卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s/RUBY3/RBIMPL/g卜部昌平
Devs do not love "3". The only exception is RUBY3_KEYWORDS in parse.y, which seems unrelated to our interests. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-04-13include what you use.卜部昌平
This reverts commit 443389effc37308ce1a3c3a840082a344fc6af56. This reverts commit d94960f22ec2de3a3855305cb51343806d2b46c7. Inclusion of header files must be explicit. Every file shall directly include what is necessary. https://github.com/include-what-you-use/include-what-you-use says: > When every file includes what it uses, then it is possible to edit any > file and remove unused headers, without fear of accidentally breaking > the upwards dependencies of that file. It also becomes easy to > automatically track and update dependencies in the source code. Though we don't use iwyu itself, the principle quoted above is a good thing that we can agree. Now that include guards were added to every and all of the headers inside of our project this changeset does not increase compile time, at least on my machine. Notes: Merged: https://github.com/ruby/ruby/pull/3023
2020-04-13add #include guard hack卜部昌平
According to MSVC manual (*1), cl.exe can skip including a header file when that: - contains #pragma once, or - starts with #ifndef, or - starts with #if ! defined. GCC has a similar trick (*2), but it acts more stricter (e. g. there must be _no tokens_ outside of #ifndef...#endif). Sun C lacked #pragma once for a looong time. Oracle Developer Studio 12.5 finally implemented it, but we cannot assume such recent version. This changeset modifies header files so that each of them include strictly one #ifndef...#endif. I believe this is the most portable way to trigger compiler optimizations. [Bug #16770] *1: https://docs.microsoft.com/en-us/cpp/preprocessor/once *2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html Notes: Merged: https://github.com/ruby/ruby/pull/3023
2020-04-10reduce duplicate include.Koichi Sasada
Without this patch, 20k files are opened (openat syscall) because of duplicate includes. This patch reduced it to 3k and build time was reduced compile time of range.o from 15sec -> 3sec on my machine. [Bug #16772] Notes: Merged: https://github.com/ruby/ruby/pull/3010
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-01-31a bit terse Doxygen comments [ci skip]卜部昌平
Creative use of `@copydoc` Doxygen command and abusing its half-broken C parser let us delete some lines of documentations, while preserving document coverages.
2020-01-31support C++ std::nullptr_t卜部昌平
C++ keyword `nullptr` represents a null pointer (note also that NULL is an integer in C++ due to its design flaw). Its type is `std::nullptr_t`, defined in <cstddef> standard header. Why not support it when the backend implementation can take a null pointer as an argument.
2020-01-29Fix a typo [ci skip]Kazuhiro NISHIYAMA
2020-01-28fix rb_define_global_function to take const VALUE*卜部昌平
It was unable for rb_define_global_function to take VALUE(*)(int argc, const VLAUE *argv, VALUE self) -style function. Test added.
2020-01-28improved support for rb_f_notimplement卜部昌平
rb_f_notimplement should be accepted for all possible arities. Test provided for that.
2020-01-28delete duplicated function overload卜部昌平
The `using engine<...snip...>::define;` line already defines this function. We don't have to repeat.
2020-01-28fix typo卜部昌平
Add missing `*`.