summaryrefslogtreecommitdiff
path: root/include/ruby/internal
AgeCommit message (Collapse)Author
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-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-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-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-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-22rb_cCont: no longer exists卜部昌平
Deleted well over a decade ago in commit 977d66ec993b0f1892fb3e4cd8ac.
2020-12-22Removed rb_cData entityNobuyoshi Nakada
* Use the wrapper of rb_cObject instead of data access * Replaced rest of extentions * Updated the version guard for Data * Added the version guard of rb_cData Notes: Merged: https://github.com/ruby/ruby/pull/3961
2020-12-22Data: delete卜部昌平
Has been deprecated since 684bdf6171b76f5bc5e4f05926a5ab01ec2b4fd5. Matz says in [ruby-core:83954] that Data should be an alias of Object. Because rb_cData has not been deprecated, let us deprecate the constant to make it a C-level synonym of rb_cObject. Notes: Merged: https://github.com/ruby/ruby/pull/3961
2020-12-21include/ruby/internal/xmalloc.h: document rb_eNoMemError卜部昌平
It was my bad, the exception that actually raises is rb_eNoMemError. [ci skip]
2020-12-21include/ruby/internal/xmalloc.h: doxygen tag卜部昌平
`@exception` is an alias of `@throw`. It might suite Ruby's document because ruby uses `raise` terminology instead of `throw`. [ci skip]
2020-12-18Use category: :experimental in warnings that are related to experimental ↵Jeremy Evans
features This adds rb_category_compile_warn in order to emit compiler warnings with categories. Note that Ripper currently ignores the category for these warnings, but by default it ignores the warnings completely, so this shouldn't matter. Notes: Merged: https://github.com/ruby/ruby/pull/3917
2020-12-18Switch rb_category_warn{,ing} to accept an rb_warning_category_tJeremy Evans
Since we decided to only allowing specific warning categories, there is no reason to have an API that accepts a general string, as it is more error-prone. Switch to only allowing the specific warning categories. As rb_category_warn{,ing} are public API, this requires making rb_warning_category_t public API as well. Notes: Merged: https://github.com/ruby/ruby/pull/3917
2020-12-18ruby_set_stack_size: no longer exists卜部昌平
Deleted since fc3c60f6081d85f6274986a7a08b59db1515fcb5
2020-12-17add HAVE_RB_EXT_RACTOR_SAFE macroKoichi Sasada
define HAVE_RB_EXT_RACTOR_SAFE to check rb_ext_ractor_safe() is available or not.
2020-12-12Signal handler type should be voidNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3889
2020-12-12Omit checks for C89 standard or laterNobuyoshi Nakada
Now we require C99, these features available of course. * prototypes * stdarg prototypes * token pasting * stringization * string literal concatenation Notes: Merged: https://github.com/ruby/ruby/pull/3889
2020-12-12Added parentheses to silence sizeof-array-div warnings [Bug #17385]Nobuyoshi Nakada
As well as 2366c681166a1dab95de6b9ca8ffcaae18aadd39.
2020-12-09Tweaked `Process::Status.wait`Nobuyoshi Nakada
* revert `rb_last_status_set` * renamed the new function as `rb_process_status_new` * `rb_process_status_new` always freezes the return value * marked `Process::Status.wait` as EXPERIMENTAL, as it has not been discussed totally yet.
2020-12-09Removed declaration of non-existent symbolNobuyoshi Nakada
2020-12-09Add support for non-blocking `Process.wait`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3853
2020-12-07Removed deprecated Time#succNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3841
2020-12-07Doxygen terminology update [ci skip]卜部昌平
Follow N2328 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2328.pdf
2020-12-07Revert getaddrinfo_a()Masaki Matsushita
getaddrinfo_a() gets stuck after fork(). To avoid this, we need 1 second sleep to wait for internal worker threads of getaddrinfo_a() to be finished, but that is unacceptable. [Bug #17220] [Feature #17134] [Feature #17187]
2020-12-06Call cleanup function for getaddrinfo_a(3) only before fork()Masaki Matsushita
Previously, rb_getaddrinfo_a_before_exec() is called from before_exec(). However, the function needs to be called only before fork(). The change moves it to before_fork().
2020-12-04Add a hook before fork() for getaddrinfo_a()Masaki Matsushita
We need stop worker threads in getaddrinfo_a() before fork(). This change adds a hook before fork() that cancel all outstanding requests and wait for all ongoing requests. Then, it waits for all worker threads to be finished. Fixes [Bug #17220]
2020-12-04Fix typos [ci skip]Kazuhiro NISHIYAMA
2020-12-03include/ruby/internal/xmalloc.h: add doxygen卜部昌平
Thought it was not a bad idea to document these CAPI. [ci skip]
2020-12-01Fix docs about movement for rb_gc_register_mark_object()Alan Wu
This API in fact pins objects passed to it. See vm.c:2546. Notes: Merged: https://github.com/ruby/ruby/pull/3815
2020-12-01rb_ext_ractor_safe() to declare ractor-safe extKoichi Sasada
C extensions can violate the ractor-safety, so only ractor-safe C extensions (C methods) can run on non-main ractors. rb_ext_ractor_safe(true) declares that the successive defined methods are ractor-safe. Otherwiwze, defined methods checked they are invoked in main ractor and raise an error if invoked at non-main ractors. [Feature #17307] Notes: Merged: https://github.com/ruby/ruby/pull/3824
2020-11-17Expose the rb_interned_str_* family of functionsJean Boussier
Fixes [Feature #13381] Notes: Merged: https://github.com/ruby/ruby/pull/3586
2020-11-06Add docs for some C extension GC APIsAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/3733
2020-10-30Add warning for str_new_static functionsAlan Wu
Many functions in string.c assume that capa + termlen to be readable memory. Add comment in header to communicate this to extension authors. See also: comment in str_fill_term() Notes: Merged: https://github.com/ruby/ruby/pull/3698