Sha256: 71653402f2e619a328822293df880432be8a99075463af1b612f13d0652d99ce

Contents?: true

Size: 504 Bytes

Versions: 5646

Compression:

Stored size: 504 Bytes

Contents

/* { dg-do run } */

#include "ffitest.h"

void doit(ffi_cif *cif, void *rvalue, void **avalue, void *closure)
{
  (void)cif;
  (void)avalue;
  *(void **)rvalue = closure;
}

typedef void * (*FN)(void);

int main()
{
  ffi_cif cif;
  ffi_go_closure cl;
  void *result;

  CHECK(ffi_prep_cif(&cif, ABI_NUM, 0, &ffi_type_pointer, NULL) == FFI_OK);
  CHECK(ffi_prep_go_closure(&cl, &cif, doit) == FFI_OK);

  ffi_call_go(&cif, FFI_FN(*(FN *)&cl), &result, NULL, &cl);

  CHECK(result == &cl);

  exit(0);
}

Version data entries

5,646 entries across 5,629 versions & 41 rubygems

Version Path
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cloudsmith-api-0.30.7 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
tdiary-5.0.9 vendor/bundle/gems/ffi-1.9.23/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
color_me_shop-1.0.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
ffi-1.9.25 ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
ffi-1.9.24 ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.23/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.23/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
tdiary-5.0.8 vendor/bundle/gems/ffi-1.9.23/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.23/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.23/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c