Support types other than double for FFI.