summaryrefslogtreecommitdiff
path: root/ext/-test-
AgeCommit message (Collapse)Author
2020-10-21Use rb_intern_const instead of rb_intern in Init functionsNobuyoshi Nakada
``` find . -name \*.o -exec nm {} + |& sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty.
2020-10-21Update dependencies for macOSNobuyoshi Nakada
2020-10-16keep proc on the stack so it does not moveAaron Patterson
2020-10-06STRUCT_ALIGNOF: use RUBY_ALIGNOF卜部昌平
This was a workaround for RUBY_ALIGNOF's glitch, which has already been fixed. See also https://github.com/ruby/ruby/pull/3570 Notes: Merged: https://github.com/ruby/ruby/pull/3631
2020-10-02memory_view.c: Use ssize_t for ndim in memory_view (#3615)Kenta Murata
* memory_view.c: Use ssize_t for ndim in memory_view * include/ruby/memory_view.h: Fix the type of item_size argument Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-09-30strip trailing spaces [ci skip]Nobuyoshi Nakada
2020-09-25Buffer protocol proposal (#3261)Kenta Murata
* Add buffer protocol * Modify for some review comments * Per-object buffer availability * Rename to MemoryView from Buffer and make compilable * Support integral repeat count in memory view format * Support 'x' for padding bytes * Add rb_memory_view_parse_item_format * Check type in rb_memory_view_register * Update dependencies in common.mk * Add test of MemoryView * Add test of rb_memory_view_init_as_byte_array * Add native size format test * Add MemoryView test utilities * Add test of rb_memory_view_fill_contiguous_strides * Skip spaces in format string * Support endianness specifiers * Update documentation * Support alignment * Use RUBY_ALIGNOF * Fix format parser to follow the pack format * Support the _ modifier * Parse count specifiers in get_format_size function. * Use STRUCT_ALIGNOF * Fix test * Fix test * Fix total size for the case with tail padding * Fix rb_memory_view_get_item_pointer * Fix rb_memory_view_parse_item_format again Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-09-25ext/-test-/RUBY_ALIGNOF: skip C++ when no compiler卜部昌平
C++ compilers are optional. Skip C++ tests when they are absent. Notes: Merged: https://github.com/ruby/ruby/pull/3570
2020-09-25ext/-test-/RUBY_ALIGNOF: add minimalistic test卜部昌平
Check if RUBY_ALIGNOF(double) is the alignment to store a double inside of a struct. Notes: Merged: https://github.com/ruby/ruby/pull/3570
2020-09-08Add FALLTHROUGHKazuhiro NISHIYAMA
Pointed out by Coverity Scan ``` ** CID 1466646: Control flow issues (MISSING_BREAK) /ext/-test-/random/loop.c: 63 in loop_get_bytes() ```
2020-09-07Added `rb_random_base_init`Nobuyoshi Nakada
To enclose the initialization of Random::Base part. Notes: Merged: https://github.com/ruby/ruby/pull/3024
2020-09-07Added WITH_REAL macrosNobuyoshi Nakada
Added `WITH_REAL` versions to `RB_RANDOM_INTERFACE` macros. Also these macros including "without real" versions no longer contain the terminator (semicolon and comma). Notes: Merged: https://github.com/ruby/ruby/pull/3024
2020-09-07Added `get_real` interfaceNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3024
2020-09-07separate rb_random_tNobuyoshi Nakada
* random.c: separate abstract rb_random_t and rb_random_mt_t for Mersenne Twister implementation. * include/ruby/random.h: the interface for extensions of Random class. * DLL imported symbol reference is not constant on Windows. * check if properly initialized. Notes: Merged: https://github.com/ruby/ruby/pull/3024
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3338
2020-08-21ext/-test-/cxxanyargs: suppress SunPro warning卜部昌平
I found a way to suppress particular kind of warnings via pragmas. Notes: Merged: https://github.com/ruby/ruby/pull/3433
2020-06-23Match the output without encoding for localized compilersNobuyoshi Nakada
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-10ext/-test-/cxxanyargs: add #pragma for icc.卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3011
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-03-29Clear all trace events during teardownAlan Wu
Since 0c2d81dada, not all trace events are cleared during VM teardown. This causes a crash when there is a tracepoint for `RUBY_INTERNAL_EVENT_GC_EXIT` active during teardown. The commit looks like a refactoring commit so I think this change was unintentional. [Bug #16682] Notes: Merged: https://github.com/ruby/ruby/pull/2959
2020-03-28The last argument of rb_rescue2() should always be (VALUE)0Benoit Daloze
* Otherwise it might segfault, since C has no idea of the type of varargs, and the C code must assume all varargs are VALUE.
2020-02-25ext/-test-/cxxanyargs: use try_link instead卜部昌平
We would like to skip this extension library when libstdc++ is missing. To avoid such situation let's use try_link instead of try_compile.
2020-02-20ext/-test-/cxxanyargs: prevent have_devel check卜部昌平
The `cxx.try_compile` command in this file kicks `cxx.have_devel?` internally, which recursively calls `cxx.try_link` with a different source code. We don't want that happen (the source code compiled in this file must be the first one). We need to fake the system.
2020-02-07more on NULL versus functions.卜部昌平
Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48
2020-02-04Fix linkage of popen_deadlock testMikhail Novosyolov
DEBUG: BUILDSTDERR: /usr/bin/ld: infinite_loop_dlsym.o: in function `native_loop_dlsym': DEBUG: BUILDSTDERR: /builddir/build/BUILD/ruby-2.7.0/ext/-test-/popen_deadlock/infinite_loop_dlsym.c:16: undefined reference to `dlsym' DEBUG: BUILDSTDERR: collect2: error: ld returned 1 exit status Ruby was built with LibreSSL. Notes: Merged: https://github.com/ruby/ruby/pull/2862
2020-02-01fix delete unnecessary return卜部昌平
Was my mistake to put return here.
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-31Return the makefile contentNobuyoshi Nakada
Block for `create_makefile` is expected to return the content of the makefile.
2020-01-31Move .IGNORE in extconf.rbNARUSE, Yui
2020-01-31Support nmakeNARUSE, Yui
2020-01-31Ignore expected errors on compiling C++ source [Bug #16331]NARUSE, Yui
BSD make can run parallel more aggressively than GNU make. It communicate with other make process through -J option in MAKEFLAGS environment variable to notify a build failure happend in an other pararell make process. https://www.freebsd.org/cgi/man.cgi?make It usually works well but ext/-test-/cxxanyargs/Makefile has two targets which are expected to fail (failure.o and failurem1.o). Additional note: To test and debug this issue, following command will speed up it. `make -f exts.mk -j8 clean all`
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-28add test for rb_define_global_function卜部昌平
was missing.
2020-01-28add test for rb_define_method_id卜部昌平
was missing.
2020-01-28improved support for rb_f_notimplement卜部昌平
rb_f_notimplement should be accepted for all possible arities. Test provided for that.
2020-01-17Update dependenciesNobuyoshi Nakada
internal/rational.h needs internal/warnings.h with Apple clang, for `UNALIGNED_MEMBER_ACCESS`.
2020-01-17Update dependencies in makefiles againKazuhiro NISHIYAMA
patch from https://travis-ci.org/ruby/ruby/jobs/638231960
2020-01-17rb_rational_raw: make a denominator always positiveKenta Murata
2020-01-17Update dependencies in makefilesKazuhiro NISHIYAMA
patch from https://travis-ci.org/ruby/ruby/jobs/638226493
2020-01-02Fully separate positional arguments and keyword argumentsJeremy Evans
This removes the warnings added in 2.7, and changes the behavior so that a final positional hash is not treated as keywords or vice-versa. To handle the arg_setup_block splat case correctly with keyword arguments, we need to check if we are taking a keyword hash. That case didn't have a test, but it affects real-world code, so add a test for it. This removes rb_empty_keyword_given_p() and related code, as that is not needed in Ruby 3. The empty keyword case is the same as the no keyword case in Ruby 3. This changes rb_scan_args to implement keyword argument separation for C functions when the : character is used. For backwards compatibility, it returns a duped hash. This is a bad idea for performance, but not duping the hash breaks at least Enumerator::ArithmeticSequence#inspect. Instead of having RB_PASS_CALLED_KEYWORDS be a number, simplify the code by just making it be rb_keyword_given_p(). Notes: Merged: https://github.com/ruby/ruby/pull/2794
2019-12-26update dependencies卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-12-26decouple internal.h headers卜部昌平
Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies). Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-11-29check interrupts at each frame pop timing.Koichi Sasada
Asynchronous events such as signal trap, finalization timing, thread switching and so on are managed by "interrupt_flag". Ruby's threads check this flag periodically and if a thread does not check this flag, above events doesn't happen. This checking is CHECK_INTS() (related) macro and it is placed at some places (laeve instruction and so on). However, at the end of C methods, C blocks (IMEMO_IFUNC) etc there are no checking and it can introduce uninterruptible thread. To modify this situation, we decide to place CHECK_INTS() at vm_pop_frame(). It increases interrupt checking points. [Bug #16366] This patch can introduce unexpected events...
2019-11-22Check -1 arity for C++Nobuyoshi Nakada
2019-11-20Revert the line for nextafter.c for FreeBSD makeNobuyoshi Nakada
2019-11-18Update dependenciesNobuyoshi Nakada