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
cybrid_api_id_ruby-0.115.132 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.131 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.131 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_bank_ruby-0.115.131 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.130 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.130 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_bank_ruby-0.115.129 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.129 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.129 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.128 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.128 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_bank_ruby-0.115.127 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.127 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.127 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_bank_ruby-0.115.126 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.126 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.126 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_bank_ruby-0.115.125 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_id_ruby-0.115.125 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c
cybrid_api_organization_ruby-0.115.125 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c