add simple foreign finalization, and pointer support
authorAndy Wingo <wingo@pobox.com>
Wed, 27 Jan 2010 21:12:58 +0000 (22:12 +0100)
committerAndy Wingo <wingo@pobox.com>
Wed, 27 Jan 2010 21:12:58 +0000 (22:12 +0100)
commit3435f3c07c27c62fcd0a6112243a27ea4ae7b462
tree1b1cf3feae945884219980ed1dd5faa056bdc2b3
parent663212bbc66b616cca9ba55d9992e2fb339d8250
add simple foreign finalization, and pointer support

* libguile/foreign.h:
* libguile/foreign.c (scm_foreign_set_finalizer_x): New function, for a
  limited form of finalization (like `free').
  (scm_alignof, scm_sizeof, parse_ffi_type, fill_ffi_type): For the
  purposes of make-foreign-function, treat '* (the asterisk symbol) as a
  pointer.

* module/system/foreign.scm: Export foreign-set-finalizer!.
libguile/foreign.c
libguile/foreign.h
module/system/foreign.scm