r6rs-pffi 1.6.0

Portable Foreign Function Interface (2023-01-02)

PFFI is a portable foreign function interface for R6RS Scheme implementations.

Supported implementations:

- Sagittarius (0.9.8 or later)

- Racket (plt-r6rs v8.3)

- Guile (3.0.8)

- Chez Scheme (v9.5)

The below implementations are no longer supported due to the inactiveness or officially declared to be archived.

- Larceny (v0.98)

- Vicare (0.3d7)

- Mosh (0.2.7)

(The version number is not upstream's. It is a semver version used for Akku.)

$ akku update
$ akku install r6rs-pffi
$ .akku/env
Authors

Takashi Kato

Uploaded to Akku by Göran Weinholt

Homepage

Information missing.

License

BSD-2-Clause

Dependencies

^0.0.0-akku

Source code

https://github.com/ktakashi/r6rs-pffi git
dbe55e08a99fe86e93c4bed56f672cec0f975772

Package contents

  • (pffi bv-pointer) R6 Chez Scheme
    • → bytevector->pointer
    • ← (rnrs) R6
    • ← (chezscheme) Built-in
  • (pffi bv-pointer) R6 Mosh
    • → bytevector->pointer
    • ← (rnrs) R6
    • ← (psyntax system $bootstrap)
  • (pffi bv-pointer) R6 Mosh
    • → bytevector->pointer
    • ← (primitives bytevector-pointer)
  • (pffi compat) R6 Chez Scheme
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void ___ pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer pointer-tracker cleanup-bytevector-locks!
    • ← (rnrs) R6
    • ← (rnrs eval) R6
    • ← (pffi bv-pointer)
    • ← (pffi helper)
    • ← (pffi misc)
    • ← (chezscheme) Built-in
  • (pffi compat) R6 GNU Guile
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void ___ pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer
    • ← (rnrs) R6
    • ← (guile) Built-in
    • ← (system foreign) Built-in
    • (srfi :1) SRFI
    • (srfi :13) SRFI
  • (pffi compat) R6 Larceny
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer
    • ← (rnrs) R6
    • ← (primitives ffi/dlopen ffi/dlsym ffi-attribute-core-entry ffi/ret-converter ffi/arg-converter ffi/convert-arg-descriptor ffi/convert-ret-descriptor ffi/make-callout ffi/make-callback ffi/apply ffi-get-abi ffi/rename-ret-type ffi/rename-arg-type void*-rt void*? void*->address sizeof:long sizeof:pointer %peek8 %peek8u %peek16 %peek16u %peek32 %peek32u %peek-long %peek-ulong peek-bytes poke-bytes void*-float-ref void*-double-ref void*-void*-ref void*-void*-set! ffi/handle->address make-nonrelocatable-bytevector) Built-in
  • (pffi compat) R6 Mosh
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer
    • ← (rnrs) R6
    • ← (mosh ffi) Built-in
    • ← (pffi bv-pointer)
  • (pffi compat) R6 Racket
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void ___ pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer
    • ← (rnrs) R6
    • ← (rnrs eval) R6
    • ← (ffi unsafe)
    • ← (ffi vector)
    • ← (racket base)
    • ← (pffi misc)
    • (srfi :13) SRFI
  • (pffi compat) R6 Sagittarius
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void ___ pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer
    • ← (rnrs) R6
    • ← (sagittarius ffi) Built-in
    • ← (sagittarius control) Built-in
  • (pffi compat) R6 Vicare
    • → open-shared-object lookup-shared-object make-c-function make-c-callback free-c-callback char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer
    • ← (rnrs) R6
    • ← (vicare ffi) Built-in
    • ← (vicare platform words) Built-in
  • (pffi helper) R6 Chez Scheme
    • → pffi-type->foreign-type adjust-argument-types ___
    • ← (rnrs) R6
    • ← (chezscheme) Built-in
  • (pffi misc) R6 Chez Scheme
    • → string-map take drop split-at drop-right
    • ← (rnrs) R6
    • ← (chezscheme) Built-in
  • (pffi misc) R6
  • (pffi pointers) R6
    • → pointer? null-pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer!
    • ← (rnrs) R6
    • ← (pffi compat)
  • (pffi procedure) R6
    • → foreign-procedure c-callback free-c-callback open-shared-object lookup-shared-object char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void ___ size-of-char size-of-short size-of-int size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t
    • ← (rnrs) R6
    • ← (pffi compat)
  • (pffi struct) R6
    • → define-foreign-struct define-foreign-union
    • ← (rnrs) R6
    • ← (pffi compat)
    • ← (pffi misc)
  • (pffi variable) R6
    • → define-foreign-variable
    • ← (rnrs) R6
    • ← (pffi misc)
    • ← (pffi compat)
  • (pffi) R6
    • → foreign-procedure c-callback free-c-callback open-shared-object char unsigned-char short unsigned-short int unsigned-int long unsigned-long float double int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t pointer callback void ___ size-of-unsigned-char size-of-char size-of-unsigned-short size-of-short size-of-unsigned-int size-of-int size-of-unsigned-long size-of-long size-of-float size-of-double size-of-pointer size-of-int8_t size-of-int16_t size-of-int32_t size-of-int64_t size-of-uint8_t size-of-uint16_t size-of-uint32_t size-of-uint64_t pointer-ref-c-uint8 pointer-ref-c-int8 pointer-ref-c-uint16 pointer-ref-c-int16 pointer-ref-c-uint32 pointer-ref-c-int32 pointer-ref-c-uint64 pointer-ref-c-int64 pointer-ref-c-unsigned-char pointer-ref-c-char pointer-ref-c-unsigned-short pointer-ref-c-short pointer-ref-c-unsigned-int pointer-ref-c-int pointer-ref-c-unsigned-long pointer-ref-c-long pointer-ref-c-float pointer-ref-c-double pointer-ref-c-pointer pointer-set-c-uint8! pointer-set-c-int8! pointer-set-c-uint16! pointer-set-c-int16! pointer-set-c-uint32! pointer-set-c-int32! pointer-set-c-uint64! pointer-set-c-int64! pointer-set-c-unsigned-char! pointer-set-c-char! pointer-set-c-unsigned-short! pointer-set-c-short! pointer-set-c-unsigned-int! pointer-set-c-int! pointer-set-c-unsigned-long! pointer-set-c-long! pointer-set-c-float! pointer-set-c-double! pointer-set-c-pointer! define-foreign-variable pointer? null-pointer? bytevector->pointer pointer->bytevector pointer->integer integer->pointer define-foreign-struct define-foreign-union
    • ← (pffi procedure)
    • ← (pffi variable)
    • ← (pffi pointers)
    • ← (pffi struct)
    • ← (rnrs) R6
  • (srfi :64 testing) R6 Chez Scheme Test
    • → test-begin test-end test-assert test-eqv test-eq test-equal test-approximate test-error test-apply test-with-runner test-match-nth test-match-all test-match-any test-match-name test-skip test-expect-fail test-read-eval-string test-group test-runner-group-path test-group-with-cleanup test-result-ref test-result-set! test-result-clear test-result-remove test-result-kind test-passed? test-log-to-file test-runner? test-runner-reset test-runner-null test-runner-simple test-runner-current test-runner-factory test-runner-get test-runner-create test-runner-test-name test-runner-pass-count test-runner-pass-count! test-runner-fail-count test-runner-fail-count! test-runner-xpass-count test-runner-xpass-count! test-runner-xfail-count test-runner-xfail-count! test-runner-skip-count test-runner-skip-count! test-runner-group-stack test-runner-group-stack! test-runner-on-test-begin test-runner-on-test-begin! test-runner-on-test-end test-runner-on-test-end! test-runner-on-group-begin test-runner-on-group-begin! test-runner-on-group-end test-runner-on-group-end! test-runner-on-final test-runner-on-final! test-runner-on-bad-count test-runner-on-bad-count! test-runner-on-bad-end-name test-runner-on-bad-end-name! test-result-alist test-result-alist! test-runner-aux-value test-runner-aux-value! test-on-group-begin-simple test-on-group-end-simple test-on-bad-count-simple test-on-bad-end-name-simple test-on-final-simple test-on-test-end-simple
    • ← (rnrs) R6
    • ← (rnrs eval) R6
    • ← (rnrs mutable-pairs) R6
    • ← (chezscheme) Built-in
  • (srfi :64) R6 Chez Scheme Test
    • → test-apply test-approximate test-assert test-begin test-end test-eq test-equal test-eqv test-error test-expect-fail test-group test-group-with-cleanup test-log-to-file test-match-all test-match-any test-match-name test-match-nth test-on-bad-count-simple test-on-bad-end-name-simple test-on-final-simple test-on-group-begin-simple test-on-group-end-simple test-on-test-end-simple test-passed? test-read-eval-string test-result-alist test-result-alist! test-result-clear test-result-kind test-result-ref test-result-remove test-result-set! test-runner-aux-value test-runner-aux-value! test-runner-create test-runner-current test-runner-factory test-runner-fail-count test-runner-fail-count! test-runner-get test-runner-group-path test-runner-group-stack test-runner-group-stack! test-runner-null test-runner-on-bad-count test-runner-on-bad-count! test-runner-on-bad-end-name test-runner-on-bad-end-name! test-runner-on-final test-runner-on-final! test-runner-on-group-begin test-runner-on-group-begin! test-runner-on-group-end test-runner-on-group-end! test-runner-on-test-begin test-runner-on-test-begin! test-runner-on-test-end test-runner-on-test-end! test-runner-pass-count test-runner-pass-count! test-runner-reset test-runner-simple test-runner-skip-count test-runner-skip-count! test-runner-test-name test-runner-xfail-count test-runner-xfail-count! test-runner-xpass-count test-runner-xpass-count! test-runner? test-skip test-with-runner
    • (srfi :64 testing) SRFI

Version history

  • 2024-01-07 ~ 1.6.0
  • 2023-08-13 ~ 1.5.0
  • 2020-12-26 ~ 1.4.0
  • 2020-05-07 ~ 1.3.0
  • 2019-03-06 ~ 1.2.0
  • 2019-02-14 ~ 1.1.0
  • 2018-10-04 ~ 1.0.0
  • 2018-08-08 ~ 0.1.0-18.6.21.akku.1
  • 2018-07-15 ~ 0.1.0-18.6.21.akku.0
  • 2018-06-22 ~ 0.1.0-18.6.21