PerlFFI / FFI-Platypus

Write Perl bindings to non-Perl libraries with FFI. No XS required.
89 stars 23 forks source link

$ffi->closure(undef) should pass the undef through to the other side. #376

Closed plicease closed 1 year ago

plicease commented 1 year ago

Right now this throws an exception:

✅ doublethink% perl -MFFI::Platypus -E 'FFI::Platypus->new->closure(undef)'
not a coderef at -e line 1.

but closure types can be undef, so I think it makes more sense to just pass it through as undef. Other non code refs should still throw the exception.