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
ffi-1.12.1 ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
ffi-1.12.0 ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/ffi-1.11.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
ffi-1.11.3 ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
ffi-1.11.2 ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cloudsmith-api-0.44.4 vendor/bundle/ruby/2.3.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.10.0/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/ffi-1.10.0/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c