examples/list_integer_types.pl
raw| 1 | use strict; |
| 2 | use warnings; |
| 3 | use FFI::Platypus 2.00; |
| 4 | |
| 5 | my $ffi = FFI::Platypus->new( api => 2 ); |
| 6 | |
| 7 | foreach my $type_name (sort $ffi->types) |
| 8 | { |
| 9 | my $meta = $ffi->type_meta($type_name); |
| 10 | next unless defined $meta->{element_type} && $meta->{element_type} eq 'int'; |
| 11 | printf "%20s %s\n", $type_name, $meta->{ffi_type}; |
| 12 | } |