ffi 1.17.0 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +3 -1
- data/Rakefile +2 -2
- data/ext/ffi_c/Function.c +52 -34
- data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +48 -60
- data/ext/ffi_c/libffi/Makefile.am +4 -3
- data/ext/ffi_c/libffi/Makefile.in +5 -25
- data/ext/ffi_c/libffi/README.md +19 -2
- data/ext/ffi_c/libffi/acinclude.m4 +6 -0
- data/ext/ffi_c/libffi/config.guess +80 -22
- data/ext/ffi_c/libffi/config.sub +161 -80
- data/ext/ffi_c/libffi/configure +41 -25
- data/ext/ffi_c/libffi/configure.ac +9 -8
- data/ext/ffi_c/libffi/configure.host +0 -5
- data/ext/ffi_c/libffi/doc/Makefile.in +1 -0
- data/ext/ffi_c/libffi/doc/libffi.texi +3 -3
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/fficonfig.h.in +3 -3
- data/ext/ffi_c/libffi/include/Makefile.in +1 -0
- data/ext/ffi_c/libffi/include/ffi_cfi.h +2 -0
- data/ext/ffi_c/libffi/include/ffi_common.h +17 -0
- data/ext/ffi_c/libffi/man/Makefile.in +1 -0
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +7 -4
- data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +2 -2
- data/ext/ffi_c/libffi/src/aarch64/internal.h +63 -17
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +16 -12
- data/ext/ffi_c/libffi/src/arc/arcompact.S +2 -2
- data/ext/ffi_c/libffi/src/arc/ffi.c +6 -2
- data/ext/ffi_c/libffi/src/closures.c +3 -3
- data/ext/ffi_c/libffi/src/dlmalloc.c +1 -0
- data/ext/ffi_c/libffi/src/mips/ffitarget.h +2 -4
- data/ext/ffi_c/libffi/src/mips/n32.S +4 -0
- data/ext/ffi_c/libffi/src/mips/o32.S +4 -0
- data/ext/ffi_c/libffi/src/or1k/ffi.c +2 -2
- data/ext/ffi_c/libffi/src/powerpc/ffi.c +13 -0
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +26 -19
- data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +26 -16
- data/ext/ffi_c/libffi/src/powerpc/internal.h +10 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +47 -0
- data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +24 -0
- data/ext/ffi_c/libffi/src/prep_cif.c +1 -4
- data/ext/ffi_c/libffi/src/s390/ffi.c +28 -1
- data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
- data/ext/ffi_c/libffi/src/s390/sysv.S +38 -0
- data/ext/ffi_c/libffi/src/sparc/ffi.c +16 -0
- data/ext/ffi_c/libffi/src/wasm32/ffi.c +10 -262
- data/ext/ffi_c/libffi/src/x86/ffi.c +4 -1
- data/ext/ffi_c/libffi/src/x86/ffi64.c +4 -1
- data/ext/ffi_c/libffi/testsuite/Makefile.am +4 -3
- data/ext/ffi_c/libffi/testsuite/Makefile.in +5 -3
- data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +4 -24
- data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +8 -25
- data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +3 -28
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/overread.c +54 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_int_float.c +88 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/x32.c +31 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +1 -1
- data/lib/ffi/ffi.rb +59 -0
- data/lib/ffi/version.rb +1 -1
- data/sig/ffi/auto_pointer.rbs +0 -1
- data/sig/ffi/library.rbs +1 -1
- data.tar.gz.sig +0 -0
- metadata +18 -18
- metadata.gz.sig +0 -0
- data/ext/ffi_c/libffi/.circleci/config.yml +0 -156
- data/ext/ffi_c/libffi/src/nios2/ffi.c +0 -304
- data/ext/ffi_c/libffi/src/nios2/ffitarget.h +0 -52
- data/ext/ffi_c/libffi/src/nios2/sysv.S +0 -136
| @@ -0,0 +1,54 @@ | |
| 1 | 
            +
            /* Area:        ffi_call
         | 
| 2 | 
            +
               Purpose:     Tests if ffi_call reads data beyond end.
         | 
| 3 | 
            +
               Limitations: needs mmap.
         | 
| 4 | 
            +
               PR:          887
         | 
| 5 | 
            +
               Originator:  Mikulas Patocka <mikulas@twibright.com>  */
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            /* { dg-do run } */
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            #include "ffitest.h"
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            #ifdef __linux__
         | 
| 12 | 
            +
            #include <sys/mman.h>
         | 
| 13 | 
            +
            #include <unistd.h>
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            static int ABI_ATTR fn(unsigned char a, unsigned short b, unsigned int c, unsigned long d)
         | 
| 16 | 
            +
            {
         | 
| 17 | 
            +
            	return (int)(a + b + c + d);
         | 
| 18 | 
            +
            }
         | 
| 19 | 
            +
            #endif
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            int main(void)
         | 
| 22 | 
            +
            {
         | 
| 23 | 
            +
            #ifdef __linux__
         | 
| 24 | 
            +
            	ffi_cif cif;
         | 
| 25 | 
            +
            	ffi_type *args[MAX_ARGS];
         | 
| 26 | 
            +
            	void *values[MAX_ARGS];
         | 
| 27 | 
            +
            	ffi_arg rint;
         | 
| 28 | 
            +
            	char *m;
         | 
| 29 | 
            +
            	int ps;
         | 
| 30 | 
            +
            	args[0] = &ffi_type_uchar;
         | 
| 31 | 
            +
            	args[1] = &ffi_type_ushort;
         | 
| 32 | 
            +
            	args[2] = &ffi_type_uint;
         | 
| 33 | 
            +
            	args[3] = &ffi_type_ulong;
         | 
| 34 | 
            +
            	CHECK(ffi_prep_cif(&cif, ABI_NUM, 4, &ffi_type_sint, args) == FFI_OK);
         | 
| 35 | 
            +
            	ps = getpagesize();
         | 
| 36 | 
            +
            	m = mmap(NULL, ps * 3, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
         | 
| 37 | 
            +
            	CHECK(m != MAP_FAILED);
         | 
| 38 | 
            +
            	CHECK(mprotect(m, ps, PROT_NONE) == 0);
         | 
| 39 | 
            +
            	CHECK(mprotect(m + ps * 2, ps, PROT_NONE) == 0);
         | 
| 40 | 
            +
            	values[0] = m + ps * 2 - sizeof(unsigned char);
         | 
| 41 | 
            +
            	values[1] = m + ps * 2 - sizeof(unsigned short);
         | 
| 42 | 
            +
            	values[2] = m + ps * 2 - sizeof(unsigned int);
         | 
| 43 | 
            +
            	values[3] = m + ps * 2 - sizeof(unsigned long);
         | 
| 44 | 
            +
            	ffi_call(&cif, FFI_FN(fn), &rint, values);
         | 
| 45 | 
            +
            	CHECK((int)rint == 0);
         | 
| 46 | 
            +
            	values[0] = m + ps;
         | 
| 47 | 
            +
            	values[1] = m + ps;
         | 
| 48 | 
            +
            	values[2] = m + ps;
         | 
| 49 | 
            +
            	values[3] = m + ps;
         | 
| 50 | 
            +
            	ffi_call(&cif, FFI_FN(fn), &rint, values);
         | 
| 51 | 
            +
            	CHECK((int)rint == 0);
         | 
| 52 | 
            +
            #endif
         | 
| 53 | 
            +
            	exit(0);
         | 
| 54 | 
            +
            }
         | 
| @@ -0,0 +1,88 @@ | |
| 1 | 
            +
            /* Area:	ffi_call
         | 
| 2 | 
            +
               Purpose:	Demonstrate structures with integers corrupting earlier floats
         | 
| 3 | 
            +
               Limitations:	none.
         | 
| 4 | 
            +
               PR:		#848
         | 
| 5 | 
            +
               Originator:	kellda  */
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            /* { dg-do run } */
         | 
| 8 | 
            +
            #include "ffitest.h"
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            typedef struct
         | 
| 11 | 
            +
            {
         | 
| 12 | 
            +
              unsigned long i;
         | 
| 13 | 
            +
              float f;
         | 
| 14 | 
            +
            } test_structure_int_float;
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            static float ABI_ATTR struct_int_float(test_structure_int_float ts1,
         | 
| 17 | 
            +
                                                   test_structure_int_float ts2 __UNUSED__,
         | 
| 18 | 
            +
                                                   test_structure_int_float ts3 __UNUSED__,
         | 
| 19 | 
            +
                                                   test_structure_int_float ts4 __UNUSED__,
         | 
| 20 | 
            +
                                                   test_structure_int_float ts5 __UNUSED__,
         | 
| 21 | 
            +
                                                   test_structure_int_float ts6 __UNUSED__)
         | 
| 22 | 
            +
            {
         | 
| 23 | 
            +
              return ts1.f;
         | 
| 24 | 
            +
            }
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            int main (void)
         | 
| 27 | 
            +
            {
         | 
| 28 | 
            +
              ffi_cif cif;
         | 
| 29 | 
            +
              ffi_type *args[MAX_ARGS];
         | 
| 30 | 
            +
              void *values[MAX_ARGS];
         | 
| 31 | 
            +
              ffi_type ts_type;
         | 
| 32 | 
            +
              ffi_type *ts_type_elements[3];
         | 
| 33 | 
            +
              float rfloat;
         | 
| 34 | 
            +
             | 
| 35 | 
            +
              test_structure_int_float ts_arg[6];
         | 
| 36 | 
            +
             | 
| 37 | 
            +
              ts_type.size = 0;
         | 
| 38 | 
            +
              ts_type.alignment = 0;
         | 
| 39 | 
            +
              ts_type.type = FFI_TYPE_STRUCT;
         | 
| 40 | 
            +
              ts_type.elements = ts_type_elements;
         | 
| 41 | 
            +
              ts_type_elements[0] = &ffi_type_ulong;
         | 
| 42 | 
            +
              ts_type_elements[1] = &ffi_type_float;
         | 
| 43 | 
            +
              ts_type_elements[2] = NULL;
         | 
| 44 | 
            +
             | 
| 45 | 
            +
              args[0] = &ts_type;
         | 
| 46 | 
            +
              values[0] = &ts_arg[0];
         | 
| 47 | 
            +
              args[1] = &ts_type;
         | 
| 48 | 
            +
              values[1] = &ts_arg[1];
         | 
| 49 | 
            +
              args[2] = &ts_type;
         | 
| 50 | 
            +
              values[2] = &ts_arg[2];
         | 
| 51 | 
            +
              args[3] = &ts_type;
         | 
| 52 | 
            +
              values[3] = &ts_arg[3];
         | 
| 53 | 
            +
              args[4] = &ts_type;
         | 
| 54 | 
            +
              values[4] = &ts_arg[4];
         | 
| 55 | 
            +
              args[5] = &ts_type;
         | 
| 56 | 
            +
              values[5] = &ts_arg[5];
         | 
| 57 | 
            +
             | 
| 58 | 
            +
              /* Initialize the cif */
         | 
| 59 | 
            +
              CHECK(ffi_prep_cif(&cif, ABI_NUM, 6, &ffi_type_float, args) == FFI_OK);
         | 
| 60 | 
            +
             | 
| 61 | 
            +
              ts_arg[0].i = 1;
         | 
| 62 | 
            +
              ts_arg[0].f = 11.11f;
         | 
| 63 | 
            +
              ts_arg[1].i = 2;
         | 
| 64 | 
            +
              ts_arg[1].f = 22.22f;
         | 
| 65 | 
            +
              ts_arg[2].i = 3;
         | 
| 66 | 
            +
              ts_arg[2].f = 33.33f;
         | 
| 67 | 
            +
              ts_arg[3].i = 4;
         | 
| 68 | 
            +
              ts_arg[3].f = 44.44f;
         | 
| 69 | 
            +
              ts_arg[4].i = 5;
         | 
| 70 | 
            +
              ts_arg[4].f = 55.55f;
         | 
| 71 | 
            +
              ts_arg[5].i = 6;
         | 
| 72 | 
            +
              ts_arg[5].f = 66.66f;
         | 
| 73 | 
            +
             | 
| 74 | 
            +
              printf ("%g\n", ts_arg[0].f);
         | 
| 75 | 
            +
              printf ("%g\n", ts_arg[1].f);
         | 
| 76 | 
            +
              printf ("%g\n", ts_arg[2].f);
         | 
| 77 | 
            +
              printf ("%g\n", ts_arg[3].f);
         | 
| 78 | 
            +
              printf ("%g\n", ts_arg[4].f);
         | 
| 79 | 
            +
              printf ("%g\n", ts_arg[5].f);
         | 
| 80 | 
            +
             | 
| 81 | 
            +
              ffi_call(&cif, FFI_FN(struct_int_float), &rfloat, values);
         | 
| 82 | 
            +
             | 
| 83 | 
            +
              printf ("%g\n", rfloat);
         | 
| 84 | 
            +
             | 
| 85 | 
            +
              CHECK(fabs(rfloat - 11.11) < 3 * FLT_EPSILON);
         | 
| 86 | 
            +
             | 
| 87 | 
            +
              exit(0);
         | 
| 88 | 
            +
            }
         | 
| @@ -0,0 +1,31 @@ | |
| 1 | 
            +
            /* Area:        ffi_call
         | 
| 2 | 
            +
               Purpose:     Check zero-extension of pointers on x32.
         | 
| 3 | 
            +
               Limitations: none.
         | 
| 4 | 
            +
               PR:          887
         | 
| 5 | 
            +
               Originator:  Mikulas Patocka <mikulas@twibright.com>  */
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            /* { dg-do run } */
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            #include "ffitest.h"
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            static int ABI_ATTR fn(int *a)
         | 
| 12 | 
            +
            {
         | 
| 13 | 
            +
            	if (a)
         | 
| 14 | 
            +
            		return *a;
         | 
| 15 | 
            +
            	return -1;
         | 
| 16 | 
            +
            }
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            int main(void)
         | 
| 19 | 
            +
            {
         | 
| 20 | 
            +
            	ffi_cif cif;
         | 
| 21 | 
            +
            	ffi_type *args[MAX_ARGS];
         | 
| 22 | 
            +
            	void *values[MAX_ARGS];
         | 
| 23 | 
            +
            	void *z[2] = { (void *)0, (void *)1 };
         | 
| 24 | 
            +
            	ffi_arg rint;
         | 
| 25 | 
            +
            	args[0] = &ffi_type_pointer;
         | 
| 26 | 
            +
            	values[0] = z;
         | 
| 27 | 
            +
            	CHECK(ffi_prep_cif(&cif, ABI_NUM, 1, &ffi_type_sint, args) == FFI_OK);
         | 
| 28 | 
            +
            	ffi_call(&cif, FFI_FN(fn), &rint, values);
         | 
| 29 | 
            +
            	CHECK((int)rint == -1);
         | 
| 30 | 
            +
            	exit(0);
         | 
| 31 | 
            +
            }
         | 
| @@ -80,7 +80,7 @@ int main (void) | |
| 80 80 | 
             
              /* { dg-output "1 32765 127 -128: 32765" } */
         | 
| 81 81 | 
             
              printf("res: %d\n", (signed short)res_call);
         | 
| 82 82 | 
             
              /* { dg-output "\nres: 32765" } */
         | 
| 83 | 
            -
              CHECK(res_call == 32765);
         | 
| 83 | 
            +
              CHECK((signed short)res_call == 32765);
         | 
| 84 84 |  | 
| 85 85 | 
             
              CHECK(ffi_prep_closure_loc(pcl, &cif, test_func_gn, NULL, code)  == FFI_OK);
         | 
| 86 86 |  | 
| @@ -80,7 +80,7 @@ int main (void) | |
| 80 80 | 
             
              /* { dg-output "1 2 127 128: 258" } */
         | 
| 81 81 | 
             
              printf("res: %d\n", (unsigned short)res_call);
         | 
| 82 82 | 
             
              /* { dg-output "\nres: 258" } */
         | 
| 83 | 
            -
              CHECK(res_call == 258);
         | 
| 83 | 
            +
              CHECK((unsigned short)res_call == 258);
         | 
| 84 84 |  | 
| 85 85 | 
             
              CHECK(ffi_prep_closure_loc(pcl, &cif, test_func_gn, NULL, code)  == FFI_OK);
         | 
| 86 86 |  | 
| @@ -76,7 +76,7 @@ int main (void) | |
| 76 76 |  | 
| 77 77 | 
             
              printf ("%d,%di %d,%di, x %d 1234, y %d 11110\n",
         | 
| 78 78 | 
             
            	  (int)tc_result, (int)(tc_result * -I), 2, 8, tc_int_arg_x, tc_y);
         | 
| 79 | 
            -
              /* dg-output "-2,8i 2,8i, x 1234 1234, y 11110 11110" */
         | 
| 79 | 
            +
              /* { dg-output "-2,8i 2,8i, x 1234 1234, y 11110 11110" } */
         | 
| 80 80 | 
             
              CHECK (creal (tc_result) == -2);
         | 
| 81 81 | 
             
              CHECK (cimag (tc_result) == 8);
         | 
| 82 82 | 
             
              CHECK (tc_int_arg_x == 1234);
         | 
    
        data/lib/ffi/ffi.rb
    CHANGED
    
    | @@ -48,3 +48,62 @@ require 'ffi/variadic' | |
| 48 48 | 
             
            require 'ffi/enum'
         | 
| 49 49 | 
             
            require 'ffi/version'
         | 
| 50 50 | 
             
            require 'ffi/function'
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            module FFI
         | 
| 53 | 
            +
              module ModernForkTracking
         | 
| 54 | 
            +
                def _fork
         | 
| 55 | 
            +
                  pid = super
         | 
| 56 | 
            +
                  if pid == 0
         | 
| 57 | 
            +
                    FFI._async_cb_dispatcher_atfork_child
         | 
| 58 | 
            +
                  end
         | 
| 59 | 
            +
                  pid
         | 
| 60 | 
            +
                end
         | 
| 61 | 
            +
              end
         | 
| 62 | 
            +
             | 
| 63 | 
            +
              module LegacyForkTracking
         | 
| 64 | 
            +
                module KernelExt
         | 
| 65 | 
            +
                  def fork
         | 
| 66 | 
            +
                    if block_given?
         | 
| 67 | 
            +
                      super do
         | 
| 68 | 
            +
                        FFI._async_cb_dispatcher_atfork_child
         | 
| 69 | 
            +
                        yield
         | 
| 70 | 
            +
                      end
         | 
| 71 | 
            +
                    else
         | 
| 72 | 
            +
                      pid = super
         | 
| 73 | 
            +
                      FFI._async_cb_dispatcher_atfork_child if pid.nil?
         | 
| 74 | 
            +
                      pid
         | 
| 75 | 
            +
                    end
         | 
| 76 | 
            +
                  end
         | 
| 77 | 
            +
                end
         | 
| 78 | 
            +
             | 
| 79 | 
            +
                module KernelExtPrivate
         | 
| 80 | 
            +
                  include KernelExt
         | 
| 81 | 
            +
                  private :fork
         | 
| 82 | 
            +
                end
         | 
| 83 | 
            +
             | 
| 84 | 
            +
                module IOExt
         | 
| 85 | 
            +
                  def popen(*args)
         | 
| 86 | 
            +
                    return super unless args[0] == '-'
         | 
| 87 | 
            +
             | 
| 88 | 
            +
                    super(*args) do |pipe|
         | 
| 89 | 
            +
                      FFI._async_cb_dispatcher_atfork_child if pipe.nil?
         | 
| 90 | 
            +
                      yield pipe
         | 
| 91 | 
            +
                    end
         | 
| 92 | 
            +
                  end
         | 
| 93 | 
            +
                  ruby2_keywords :popen if respond_to?(:ruby2_keywords)
         | 
| 94 | 
            +
                end
         | 
| 95 | 
            +
              end
         | 
| 96 | 
            +
             | 
| 97 | 
            +
              if Process.respond_to?(:_fork)
         | 
| 98 | 
            +
                # The nice Ruby 3.1+ way of doing things
         | 
| 99 | 
            +
                ::Process.singleton_class.prepend(ModernForkTracking)
         | 
| 100 | 
            +
              elsif Process.respond_to?(:fork)
         | 
| 101 | 
            +
                # Barf. Old CRuby.
         | 
| 102 | 
            +
                # Most of the inspiration for how to do this was stolen from ActiveSupport.
         | 
| 103 | 
            +
                ::Object.prepend(LegacyForkTracking::KernelExtPrivate)
         | 
| 104 | 
            +
                ::Object.singleton_class.prepend(LegacyForkTracking::KernelExt)
         | 
| 105 | 
            +
                ::Kernel.prepend(LegacyForkTracking::KernelExtPrivate)
         | 
| 106 | 
            +
                ::Kernel.singleton_class.prepend(LegacyForkTracking::KernelExt)
         | 
| 107 | 
            +
                ::IO.singleton_class.prepend(LegacyForkTracking::IOExt)
         | 
| 108 | 
            +
              end
         | 
| 109 | 
            +
            end
         | 
    
        data/lib/ffi/version.rb
    CHANGED
    
    
    
        data/sig/ffi/auto_pointer.rbs
    CHANGED
    
    | @@ -13,7 +13,6 @@ module FFI | |
| 13 13 | 
             
                end
         | 
| 14 14 |  | 
| 15 15 | 
             
                def initialize: (Pointer pointer, Method | ^(self) -> void | Releaser::_Proc[self] callable) -> self
         | 
| 16 | 
            -
                            # | (Pointer pointer) { (self) -> void } -> self # https://github.com/ffi/ffi/issues/1071
         | 
| 17 16 | 
             
                              | (Pointer pointer) -> self # where class < `def self.release: (instance pointer) -> void`
         | 
| 18 17 |  | 
| 19 18 | 
             
                extend DataConverter[Pointer, instance, nil]
         | 
    
        data/sig/ffi/library.rbs
    CHANGED
    
    | @@ -33,7 +33,7 @@ module FFI | |
| 33 33 | 
             
                def find_type: (ffi_lib_type t) -> Type
         | 
| 34 34 | 
             
                def freeze: () -> void
         | 
| 35 35 | 
             
                def function_names: (_ToS name, Array[Type | singleton(Struct)] arg_types) -> Array[String]
         | 
| 36 | 
            -
                def typedef: [T < Type] (T old, Symbol | DataConverter add, ?untyped) -> T
         | 
| 36 | 
            +
                def typedef: [T < Type, N, R, C] (T old, Symbol | DataConverter[N, R, C] add, ?untyped) -> T
         | 
| 37 37 | 
             
                           | (Symbol old, Symbol add, ?untyped) -> (Type | Enum)
         | 
| 38 38 | 
             
                           | [X < DataConverter[N, R, C], N, R, C] (X old, Symbol add, ?untyped) -> Type::Mapped[X, N, R, C]
         | 
| 39 39 | 
             
                           | (:enum old, Array[Symbol | Integer] add, ?untyped) -> Enum
         | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ffi
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.17. | 
| 4 | 
            +
              version: 1.17.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Wayne Meissner
         | 
| @@ -10,8 +10,8 @@ cert_chain: | |
| 10 10 | 
             
            - |
         | 
| 11 11 | 
             
              -----BEGIN CERTIFICATE-----
         | 
| 12 12 | 
             
              MIIEBDCCAmygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
         | 
| 13 | 
            -
               | 
| 14 | 
            -
               | 
| 13 | 
            +
              L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDEyMjkxOTU2NTZaFw0yNTEy
         | 
| 14 | 
            +
              MjkxOTU2NTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
         | 
| 15 15 | 
             
              PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
         | 
| 16 16 | 
             
              mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
         | 
| 17 17 | 
             
              eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
         | 
| @@ -22,17 +22,17 @@ cert_chain: | |
| 22 22 | 
             
              chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
         | 
| 23 23 | 
             
              9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
         | 
| 24 24 | 
             
              A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
         | 
| 25 | 
            -
               | 
| 26 | 
            -
               | 
| 27 | 
            -
               | 
| 28 | 
            -
               | 
| 29 | 
            -
               | 
| 30 | 
            -
               | 
| 31 | 
            -
               | 
| 32 | 
            -
               | 
| 33 | 
            -
               | 
| 25 | 
            +
              7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEAoZZWzNV2XXaoSmvyamSSN+Wt/Ia+DNrU
         | 
| 26 | 
            +
              2pc3kMEqykH6l1WiVPszr6HavQ//2I2UcSRSS5AGDdiSXcfyFmHtMBdtJHhTPcn7
         | 
| 27 | 
            +
              4DLliB0szpvwG+ltGD8PI8eWkLaTQeFzs+0QCTavgKV+Zw56Q0J5zZvHHUMrLkUD
         | 
| 28 | 
            +
              qhwKjdTdkrRTn9Sqi0BrIRRZGTUDdrt8qoWm35aES5arKZzytgrRD/kXfFW2LCg0
         | 
| 29 | 
            +
              FzgTKibR4/3g8ph94kQLg/D2SMlVPkQ3ECi036mZxDC2n8V6u3rDkG5923wmrRZB
         | 
| 30 | 
            +
              J6cqz475Q8HYORQCB68OPzkWMfC7mBo3vpSsIqRoNs1FE4FJu4FGwZG8fBSrDC4H
         | 
| 31 | 
            +
              bZe+GtyS3e2SMjgT65zp35gLO9I7MquzYN9P6V2u1iBpTycchk5z9R1ghxzZSBT8
         | 
| 32 | 
            +
              DrkJ9tVlPQtJB0LqT0tvBap4upnwT1xYq721b5dwH6AF4Pi6iz/dc5vnq1/MH8bV
         | 
| 33 | 
            +
              8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
         | 
| 34 34 | 
             
              -----END CERTIFICATE-----
         | 
| 35 | 
            -
            date:  | 
| 35 | 
            +
            date: 2025-04-15 00:00:00.000000000 Z
         | 
| 36 36 | 
             
            dependencies:
         | 
| 37 37 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 38 38 | 
             
              name: rake
         | 
| @@ -171,7 +171,6 @@ files: | |
| 171 171 | 
             
            - ext/ffi_c/libffi/.ci/powerpc-eabisim.exp
         | 
| 172 172 | 
             
            - ext/ffi_c/libffi/.ci/site.exp
         | 
| 173 173 | 
             
            - ext/ffi_c/libffi/.ci/wine-sim.exp
         | 
| 174 | 
            -
            - ext/ffi_c/libffi/.circleci/config.yml
         | 
| 175 174 | 
             
            - ext/ffi_c/libffi/.gitattributes
         | 
| 176 175 | 
             
            - ext/ffi_c/libffi/.github/issue_template.md
         | 
| 177 176 | 
             
            - ext/ffi_c/libffi/.github/workflows/build.yml
         | 
| @@ -306,9 +305,6 @@ files: | |
| 306 305 | 
             
            - ext/ffi_c/libffi/src/moxie/eabi.S
         | 
| 307 306 | 
             
            - ext/ffi_c/libffi/src/moxie/ffi.c
         | 
| 308 307 | 
             
            - ext/ffi_c/libffi/src/moxie/ffitarget.h
         | 
| 309 | 
            -
            - ext/ffi_c/libffi/src/nios2/ffi.c
         | 
| 310 | 
            -
            - ext/ffi_c/libffi/src/nios2/ffitarget.h
         | 
| 311 | 
            -
            - ext/ffi_c/libffi/src/nios2/sysv.S
         | 
| 312 308 | 
             
            - ext/ffi_c/libffi/src/or1k/ffi.c
         | 
| 313 309 | 
             
            - ext/ffi_c/libffi/src/or1k/ffitarget.h
         | 
| 314 310 | 
             
            - ext/ffi_c/libffi/src/or1k/sysv.S
         | 
| @@ -329,6 +325,7 @@ files: | |
| 329 325 | 
             
            - ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h
         | 
| 330 326 | 
             
            - ext/ffi_c/libffi/src/powerpc/ffi_sysv.c
         | 
| 331 327 | 
             
            - ext/ffi_c/libffi/src/powerpc/ffitarget.h
         | 
| 328 | 
            +
            - ext/ffi_c/libffi/src/powerpc/internal.h
         | 
| 332 329 | 
             
            - ext/ffi_c/libffi/src/powerpc/linux64.S
         | 
| 333 330 | 
             
            - ext/ffi_c/libffi/src/powerpc/linux64_closure.S
         | 
| 334 331 | 
             
            - ext/ffi_c/libffi/src/powerpc/ppc_closure.S
         | 
| @@ -422,6 +419,7 @@ files: | |
| 422 419 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c
         | 
| 423 420 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/negint.c
         | 
| 424 421 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/offsets.c
         | 
| 422 | 
            +
            - ext/ffi_c/libffi/testsuite/libffi.call/overread.c
         | 
| 425 423 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c
         | 
| 426 424 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/promotion.c
         | 
| 427 425 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/pyobjc_tc.c
         | 
| @@ -461,6 +459,7 @@ files: | |
| 461 459 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c
         | 
| 462 460 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c
         | 
| 463 461 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c
         | 
| 462 | 
            +
            - ext/ffi_c/libffi/testsuite/libffi.call/struct_int_float.c
         | 
| 464 463 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c
         | 
| 465 464 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c
         | 
| 466 465 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c
         | 
| @@ -470,6 +469,7 @@ files: | |
| 470 469 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c
         | 
| 471 470 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c
         | 
| 472 471 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c
         | 
| 472 | 
            +
            - ext/ffi_c/libffi/testsuite/libffi.call/x32.c
         | 
| 473 473 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp
         | 
| 474 474 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c
         | 
| 475 475 | 
             
            - ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c
         | 
| @@ -764,7 +764,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 764 764 | 
             
                - !ruby/object:Gem::Version
         | 
| 765 765 | 
             
                  version: '0'
         | 
| 766 766 | 
             
            requirements: []
         | 
| 767 | 
            -
            rubygems_version: 3.6. | 
| 767 | 
            +
            rubygems_version: 3.6.2
         | 
| 768 768 | 
             
            specification_version: 4
         | 
| 769 769 | 
             
            summary: Ruby FFI
         | 
| 770 770 | 
             
            test_files: []
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file | 
| @@ -1,156 +0,0 @@ | |
| 1 | 
            -
            version: 2.1
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            defaults: &defaults
         | 
| 4 | 
            -
              working_directory: ~/repo
         | 
| 5 | 
            -
              docker:
         | 
| 6 | 
            -
                # Built from:
         | 
| 7 | 
            -
                # https://github.com/pyodide/pyodide/blob/2ab4b0ab6aefe99fd994bb4f9ab086e5c0aebb7b/Dockerfile
         | 
| 8 | 
            -
                - image: pyodide/pyodide-env:20230126-chrome109-firefox109-py311
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            jobs:
         | 
| 11 | 
            -
              install-emsdk:
         | 
| 12 | 
            -
                <<: *defaults
         | 
| 13 | 
            -
                steps:
         | 
| 14 | 
            -
                  - checkout
         | 
| 15 | 
            -
                  - run:
         | 
| 16 | 
            -
                      name: install emsdk
         | 
| 17 | 
            -
                      command: |
         | 
| 18 | 
            -
                        git clone https://github.com/emscripten-core/emsdk.git --depth=1
         | 
| 19 | 
            -
                        cd emsdk
         | 
| 20 | 
            -
                        ./emsdk install 3.1.30
         | 
| 21 | 
            -
                        ./emsdk activate 3.1.30
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                  - persist_to_workspace:
         | 
| 24 | 
            -
                      root: .
         | 
| 25 | 
            -
                      paths:
         | 
| 26 | 
            -
                        - emsdk
         | 
| 27 | 
            -
             | 
| 28 | 
            -
              build:
         | 
| 29 | 
            -
                parameters:
         | 
| 30 | 
            -
                  wasm-bigint:
         | 
| 31 | 
            -
                    description: Should we build with wasm-bigint?
         | 
| 32 | 
            -
                    type: string
         | 
| 33 | 
            -
                    default: ""
         | 
| 34 | 
            -
                environment:
         | 
| 35 | 
            -
                  WASM_BIGINT: << parameters.wasm-bigint >>
         | 
| 36 | 
            -
                <<: *defaults
         | 
| 37 | 
            -
                steps:
         | 
| 38 | 
            -
                  - checkout
         | 
| 39 | 
            -
                  - attach_workspace:
         | 
| 40 | 
            -
                      at: .
         | 
| 41 | 
            -
             | 
| 42 | 
            -
                  - run:
         | 
| 43 | 
            -
                      name: build
         | 
| 44 | 
            -
                      command: |
         | 
| 45 | 
            -
                        source ./emsdk/emsdk_env.sh
         | 
| 46 | 
            -
                        ./testsuite/emscripten/build.sh
         | 
| 47 | 
            -
             | 
| 48 | 
            -
                  - run:
         | 
| 49 | 
            -
                      name: build tests
         | 
| 50 | 
            -
                      command: |
         | 
| 51 | 
            -
                        source ./emsdk/emsdk_env.sh
         | 
| 52 | 
            -
                        cp -r testsuite/libffi.call testsuite/libffi.call.test
         | 
| 53 | 
            -
                        cp -r testsuite/libffi.closures testsuite/libffi.closures.test
         | 
| 54 | 
            -
                        ./testsuite/emscripten/build-tests.sh testsuite/libffi.call.test
         | 
| 55 | 
            -
                        ./testsuite/emscripten/build-tests.sh testsuite/libffi.closures.test
         | 
| 56 | 
            -
             | 
| 57 | 
            -
                  - persist_to_workspace:
         | 
| 58 | 
            -
                      root: .
         | 
| 59 | 
            -
                      paths:
         | 
| 60 | 
            -
                        - target
         | 
| 61 | 
            -
                        - testsuite
         | 
| 62 | 
            -
             | 
| 63 | 
            -
              test:
         | 
| 64 | 
            -
                parameters:
         | 
| 65 | 
            -
                  test-params:
         | 
| 66 | 
            -
                    description: The tests to run.
         | 
| 67 | 
            -
                    type: string
         | 
| 68 | 
            -
                <<: *defaults
         | 
| 69 | 
            -
                steps:
         | 
| 70 | 
            -
                  - checkout
         | 
| 71 | 
            -
             | 
| 72 | 
            -
                  - attach_workspace:
         | 
| 73 | 
            -
                      at: .
         | 
| 74 | 
            -
             | 
| 75 | 
            -
                  - run:
         | 
| 76 | 
            -
                      name: run tests
         | 
| 77 | 
            -
                      command: |
         | 
| 78 | 
            -
                        git reset --hard
         | 
| 79 | 
            -
                        cd testsuite/emscripten/
         | 
| 80 | 
            -
                        mkdir test-results
         | 
| 81 | 
            -
                        pytest \
         | 
| 82 | 
            -
                          --junitxml=test-results/junit.xml \
         | 
| 83 | 
            -
                           test_libffi.py \
         | 
| 84 | 
            -
                           << parameters.test-params >>
         | 
| 85 | 
            -
                  - store_test_results:
         | 
| 86 | 
            -
                      path: testsuite/emscripten/test-results
         | 
| 87 | 
            -
             | 
| 88 | 
            -
              test-dejagnu:
         | 
| 89 | 
            -
                parameters:
         | 
| 90 | 
            -
                  params:
         | 
| 91 | 
            -
                    description: Parameters to node-tests
         | 
| 92 | 
            -
                    type: string
         | 
| 93 | 
            -
                    default: ""
         | 
| 94 | 
            -
             | 
| 95 | 
            -
                <<: *defaults
         | 
| 96 | 
            -
                steps:
         | 
| 97 | 
            -
                  - checkout
         | 
| 98 | 
            -
             | 
| 99 | 
            -
                  - attach_workspace:
         | 
| 100 | 
            -
                      at: .
         | 
| 101 | 
            -
             | 
| 102 | 
            -
                  - run:
         | 
| 103 | 
            -
                      name: run tests
         | 
| 104 | 
            -
                      command: |
         | 
| 105 | 
            -
                        source ./emsdk/emsdk_env.sh
         | 
| 106 | 
            -
                        testsuite/emscripten/node-tests.sh << parameters.params >>
         | 
| 107 | 
            -
             | 
| 108 | 
            -
            workflows:
         | 
| 109 | 
            -
              version: 2
         | 
| 110 | 
            -
              build-and-test:
         | 
| 111 | 
            -
                jobs:
         | 
| 112 | 
            -
                  - install-emsdk
         | 
| 113 | 
            -
             | 
| 114 | 
            -
                  - build:
         | 
| 115 | 
            -
                      name: build
         | 
| 116 | 
            -
                      requires:
         | 
| 117 | 
            -
                        - install-emsdk
         | 
| 118 | 
            -
             | 
| 119 | 
            -
                  - build:
         | 
| 120 | 
            -
                      name: build-bigint
         | 
| 121 | 
            -
                      wasm-bigint: "true"
         | 
| 122 | 
            -
                      requires:
         | 
| 123 | 
            -
                        - install-emsdk
         | 
| 124 | 
            -
             | 
| 125 | 
            -
                  - test:
         | 
| 126 | 
            -
                      name: test-firefox
         | 
| 127 | 
            -
                      test-params: -k firefox
         | 
| 128 | 
            -
                      requires:
         | 
| 129 | 
            -
                        - build
         | 
| 130 | 
            -
                  - test:
         | 
| 131 | 
            -
                      name: test-chrome
         | 
| 132 | 
            -
                      test-params: -k chrome
         | 
| 133 | 
            -
                      requires:
         | 
| 134 | 
            -
                        - build
         | 
| 135 | 
            -
             | 
| 136 | 
            -
                  - test:
         | 
| 137 | 
            -
                      name: test-firefox-bigint
         | 
| 138 | 
            -
                      test-params: -k firefox
         | 
| 139 | 
            -
                      requires:
         | 
| 140 | 
            -
                        - build-bigint
         | 
| 141 | 
            -
             | 
| 142 | 
            -
                  - test:
         | 
| 143 | 
            -
                      name: test-chrome-bigint
         | 
| 144 | 
            -
                      test-params: -k chrome
         | 
| 145 | 
            -
                      requires:
         | 
| 146 | 
            -
                        - build-bigint
         | 
| 147 | 
            -
             | 
| 148 | 
            -
                  - test-dejagnu:
         | 
| 149 | 
            -
                      name: test-dejagnu
         | 
| 150 | 
            -
                      requires:
         | 
| 151 | 
            -
                        - install-emsdk
         | 
| 152 | 
            -
                  - test-dejagnu:
         | 
| 153 | 
            -
                      name: test-dejagnu-bigint
         | 
| 154 | 
            -
                      params: --wasm-bigint
         | 
| 155 | 
            -
                      requires:
         | 
| 156 | 
            -
                        - install-emsdk
         |