FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
authorLudovic Courtès <ludo@gnu.org>
Sat, 26 Nov 2011 21:27:32 +0000 (22:27 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 26 Nov 2011 21:27:32 +0000 (22:27 +0100)
commit59a0273338ca52dd920eef90439f95d313214a6b
tree34052f3557ed5a7f523b68b275b695f7418468b6
parent4855c63441c5f11a58b8157c877e5890a7b0ffe1
FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.

* libguile/foreign.c (scm_procedure_to_pointer): Keep a weak reference
  to PROC.

* test-suite/tests/foreign.test ("procedure->pointer")["procedure is
  retained"]: New test.
libguile/foreign.c
test-suite/tests/foreign.test