summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-05-10Removed missing/dup2.cNobuyoshi Nakada
This function should be always available, as POSIX-compliant or Windows platform are required since 1.9. Also the code in this file is MT-unsafe. Notes: Merged: https://github.com/ruby/ruby/pull/4483
2021-05-10rb_fiber_new_kw: doesn't exist卜部昌平
Not against having such thing but currently we lack one.
2021-05-07Protoized old pre-ANSI K&R style declarations and definitionsNobuyoshi Nakada
2021-05-06Allow newobj_of0 and newobj_slowpath to allocate into multiple heap slotsMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/4391
2021-05-04Fix compilation errors for c99Peter Zhu
ENUM_OVER_INT is sometimes not defined. Use #ifdef instead if #if. Notes: Merged: https://github.com/ruby/ruby/pull/4457
2021-05-04Fix -Wundef warnings for RBIMPL_HAS_BUILTINBenoit Daloze
* See [Feature #17752] * Defining explicitly to 0 seems the best solution, see https://github.com/ruby/ruby/pull/4428 * For example: ./include/ruby/internal/has/builtin.h:49:33: error: "RBIMPL_HAS_BUILTIN___builtin_assume" is not defined, evaluates to 0 [-Werror=undef] 49 | # define RBIMPL_HAS_BUILTIN(_) (RBIMPL_HAS_BUILTIN_ ## _) | ^~~~~~~~~~~~~~~~~~~ ./include/ruby/internal/assume.h:75:7: note: in expansion of macro ‘RBIMPL_HAS_BUILTIN’ 75 | #elif RBIMPL_HAS_BUILTIN(__builtin_assume) | ^~~~~~~~~~~~~~~~~~
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-05-04Add RBIMPL_RVALUE_EMBED_LEN_MAX neeeded by internal/bignum.hBenoit Daloze
* It evaluated to 0 before, revealed by -Wundef * See [Feature #17752] Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4428
2021-05-04Fix trivial -Wundef warningsBenoit Daloze
* See [Feature #17752] Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com> 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-04-16rb_hash_free(): has never existed.卜部昌平
This is just a hoax. Nobody have ever implemented a function named as such. Also the functionality implied by the name must not be a public API if any.
2021-04-13Inline LONG_LONG conversionsNobuyoshi Nakada
Not only NUM2LL, also LL2NUM, ULL2NUM and NUM2ULL.
2021-04-13workaround MSVC error卜部昌平
Previous code failed to compile on MSVC. Log: https://github.com/ruby/ruby/pull/4371/checks?check_run_id=2304484466 This is possibly due to the fact that: 1. `Data_Wrap_Struct(...)` appears in a source code 2. which expands to `rb_data_object_wrap(...)` 3. which expands to `RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)` 4. which expands to `rb_data_object_wrap_0` 5. which expands to `rb_data_object_wrap`, so far so good, but 6. this is a recursive macro expansion (see step 2). Everybody stops expanding... - in step 4 for MSVC, and - in step 5 for GCC etc. I have no idea why but this proposed changeset prevents MSVC from stopping at step 4.
2021-04-13dependency updates卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-04-13get rid of #pragma GCC diagnostic ignored "-Wundef"卜部昌平
Use of TOKEN_PASTE was a bad idea at the first place. Just use ## everywhere. Nobody practically lacks token pasting. Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-04-10Fix symbol export.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4374
2021-03-30Disable public interface for now.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Fix native implementation.Samuel Williams
# Conflicts: # scheduler.c Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Add hook for `Timeout.timeout`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-24Removed dln_a_outNobuyoshi Nakada
a.out format is considered extinct nowadays. Notes: Merged: https://github.com/ruby/ruby/pull/4317 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-23[Doc] Standardize wording s/sweeped/swept/Kenichi Kamiya
Notes: Merged: https://github.com/ruby/ruby/pull/4307
2021-03-19Fix typos in rhash.h (#4292)Kenichi Kamiya
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-03-07Removed a typo in a comment [ci skip]Nobuyoshi Nakada
2021-03-05rb_sym_interned_p: doesn't exist卜部昌平
Deleted decades ago in commit 6e0fed271c1d2e6f2b13b99d89d43e7d00e81472 Note also that we eventually ended up reinventing this exact same functionality. It is called rb_check_id() now.
2021-02-25rb_random_int: ended before it begins卜部昌平
It existed since f3d022543ef2afde3d53e7f6b3028eafe39d0ef4 until 96760236079b15674a6322a2ca41b1528b51afbd. No official releases included the actual function. The declaration shall be deleted.
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>
2021-02-09Define macro for fiber/scheduler.hNobuyoshi Nakada
2021-02-09Updated pre-prototype declarationsNobuyoshi Nakada
2021-02-09Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams
* Rename `rb_scheduler` to `rb_fiber_scheduler`. * Use public interface if available. * Use `rb_check_funcall` where possible. * Don't use `unblock` unless the fiber was non-blocking. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2021-02-04rb_clear_method_cache_by_class: no longer exist卜部昌平
It is questionable whether we can change a public API but this function does not exist today. No way.
2021-01-27Update include/ruby/internal/fl_type.h 卜部昌平
https://github.com/ruby/ruby/pull/4100#pullrequestreview-576059827 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-01-27include/ruby/internal/fl_type.h: refactor hoist out #if conditions卜部昌平
cf: https://github.com/ruby/ruby/pull/4100#pullrequestreview-575952836
2021-01-27kill CLONESETUP and DUPSETUP卜部昌平
They are no longer how Object#clone/Object#dup are defined. In fact DUPSETUP is not used from anywhere. CLONESETUP has only one usage. Let's not expose them to extension libraries. cf https://github.com/ruby/ruby/pull/4100#discussion_r563481718
2021-01-27attributes on enumerators are GCC6-ism卜部昌平
See also https://gcc.gnu.org/gcc-6/changes.html Clang has this feature when __has_extension(enumerator_attributes) is set. MSVC has #pragma deprecated instead. Notes: Merged: https://github.com/ruby/ruby/pull/4100
2021-01-27warnings on use of RUBY_FL_TAINT卜部昌平
matz said in [ruby-core:94979]: > 3.0: > * taint/trust/untaint/untrust non-verbose warning when called This is it, for C extensions. Notes: Merged: https://github.com/ruby/ruby/pull/4100
2021-01-27kill OBJ_TAINT etc.卜部昌平
Now that RUBY_FL_TAINT is recycled to become new RUBY_FL_SHAREABLE. Setting/clearing this flag from extension libraries break Ractor. Especially problematic one is OBJ_INFECT, which would make non-shareable objects travel across Ractor boundaries. Such operations should just be prohibited. Notes: Merged: https://github.com/ruby/ruby/pull/4100
2021-01-27fix OBJ_UNTRUST etc.卜部昌平
It seems I broke them in commit 9e6e39c3512f7a962c44dc3729c98a0f8be90341 Sorry! Notes: Merged: https://github.com/ruby/ruby/pull/4100
2021-01-26Add compaction notes for class/module creation C APIsAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/3885
2021-01-19Replace "iff" with "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. Notes: Merged: https://github.com/ruby/ruby/pull/4035
2021-01-11Define printf qualifier prefix fallbacksNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4050
2021-01-09Fixed a typo [Bug #17522]Tee KOBAYASHI
2021-01-06expose some C-APIs for ractorKoichi Sasada
expose some C-APIs to try to make ractor utilities on external gems. * add * rb_ractor_local_storage_value_lookup() to check availability * expose * rb_ractor_make_shareable() * rb_ractor_make_shareable_copy() * rb_proc_isolate() (not public) * rb_proc_isolate_bang() (not public) * rb_proc_ractor_make_shareable() (not public)
2021-01-02Fixed dangling imemo_tmpbufNobuyoshi Nakada
The count of rb_alloc_tmp_buffer_with_count is the allocation size counted in VALUE size but not in the requested element size. Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> Co-authored-by: Koichi Sasada <ko1@atdot.net>
2020-12-31Fixed missing NORETURN on rb_mod_const_missingNobuyoshi Nakada
2020-12-31Defined RBIMPL_ATTR_DEPRECATED_INTERNALNobuyoshi Nakada
Get rid of duplicate attributes, which may be warned or ignored except for the first.
2020-12-30Replaced deprecation macrosNobuyoshi Nakada
* DECLARE_DEPRECATED_FEATURE with RBIMPL_ATTR_DEPRECATED_SINCE * DECLARE_DEPRECATED_INTERNAL_FEATURE with RBIMPL_ATTR_INTERNAL And moved function declarations outside both.
2020-12-27win32: Declared wait and fixed the return typeNobuyoshi Nakada
2020-12-25[memory_view] Fix a commentKenta Murata
A consumer of a MemoryView no longer guards the original object. [ci skip]
2020-12-25Development of 3.1.0 started.Yukihiro "Matz" Matsumoto
2020-12-24Use RBIMPL_COMPILER_{SINCE,BEFORE} for MSVCNobuyoshi Nakada
Pointed out by @shyouhei. NOTE: Already we have dropped the support for older MSVCs, probably prior to 1300 or 1400. Remove the conditional code, especially in win32/Makefile.sub.