FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
authorLudovic Courtès <ludo@gnu.org>
Wed, 16 Nov 2011 22:53:58 +0000 (23:53 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 16 Nov 2011 22:53:58 +0000 (23:53 +0100)
commit46d80cae0876b63b460b2997c7e3bfab94461166
tree982ecbef9cd9208c21eb10ea3bda447cd8681d7b
parent449c4d44d0dd82749ca1eb8cfeb2ba025caf6eaa
FFI: Hold a weak reference to the CIF made by `procedure->pointer'.

* libguile/foreign.c (scm_procedure_to_pointer): Keep a weak reference
  to CIF so that it is not reclaimed before POINTER.  Before that it
  could be reclaimed and typically reused to store the CIF of another
  procedure with the same arity, leading to obscure wrong-type-arg
  errors.
libguile/foreign.c