summaryrefslogtreecommitdiff
path: root/include/ruby/backward/cxxanyargs.hpp
AgeCommit message (Collapse)Author
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-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-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-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|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
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-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 `*`.
2020-01-28template metaprogramming instead of macros卜部昌平
C++ (and myself) hates macros. If we could do the same thing in both preprocessor and template, we shall choose template. This particular part of the ruby header is one of such situations. Notes: Merged: https://github.com/ruby/ruby/pull/2864
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-10-24include/ruby/backward/cxxanyargs.hpp: call `va_end` before returnYusuke Endoh
Coverity Scan complains it.
2019-09-20Overload variable definition functionsNobuyoshi Nakada
Define overloading functions of rb_define_virtual_variable and rb_define_hooked_variable, for combinations with and without ANYARGS casts. Notes: Merged: https://github.com/ruby/ruby/pull/2461
2019-09-15oops [ci skip]卜部昌平
Fixing typo. It seems I failed to press the shift key.
2019-09-10fix CentOS 6 compile error卜部昌平
See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-master/log/20190910T003005Z.fail.html.gz
2019-09-06fix Visual Studio compilation error卜部昌平
See also https://github.com/ruby/ruby/runs/213964487
2019-09-06add include/ruby/backward/cxxanyargs.hpp卜部昌平
Compilation of extension libraries written in C++ are reportedly broken due to https://github.com/ruby/ruby/pull/2404 The root cause of this issue was that the definition of ANYARGS differ between C and C++, and that of C++ is incompatible with the updated ones. We are using the incompatibility against itself. In C++ two distinct function prototypes can be overloaded. We provide the old, ANYARGSed prototypes in addition to the current granular ones; and let the older ones warn about types.