Fixed segfault due to local perlcall_cif
authorRyan Jendoubi <ryan.jendoubi@gmail.com>
Fri, 2 Jul 2010 11:53:16 +0000 (12:53 +0100)
committerRyan Jendoubi <ryan.jendoubi@gmail.com>
Fri, 2 Jul 2010 11:53:16 +0000 (12:53 +0100)
commita75cb27324a8e93ad100508f4b1534d2bacb4f13
tree4b41c3ca6f33eec3bbf80d6e37e94152aa937cb7
parentcbccdb0dbb9e806e054dfb9845c5e812a164950c
Fixed segfault due to local perlcall_cif

Noticed _perl_cb_call wasn't receiving the right cif. Clearly
ffi_prep_closure_loc just stores a Pointer to the cif, not by val.
perlcall_cif was just a local variable in _make_closure; now
allocated (and added to struct _perl_cb_data for free'ing later).

Now segfaulting on pushing vars to Perl stack but this should
be simpler.

modified:   Ctypes.xs
Ctypes.xs