FFI-Platypus

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

     my $intarraysize = $ffi->sizeof('int[64]');  # usually 4*64
     my $intarraysize = $ffi->sizeof('long[64]'); # usually 4*64 or 8*64
                                                  # depending on platform

    Keep in mind that "pointer" types will always be the pointer / word
    size for the platform that you are using. This includes strings, opaque
    and pointers to other types.

    This function is not very fast, so you might want to save this value as
    a constant, particularly if you need the size in a loop with many
    iterations.

 alignof

    [version 0.21]

     my $align = $ffi->alignof($type);

    Returns the alignment of the given type in bytes.

 kindof

lib/FFI/Platypus.pm  view on Meta::CPAN

 my $intarraysize = $ffi->sizeof('int[64]');  # usually 4*64
 my $intarraysize = $ffi->sizeof('long[64]'); # usually 4*64 or 8*64
                                              # depending on platform

Keep in mind that "pointer" types will always be the pointer / word size
for the platform that you are using.  This includes strings, opaque and
pointers to other types.

This function is not very fast, so you might want to save this value as
a constant, particularly if you need the size in a loop with many
iterations.

=head2 alignof

[version 0.21]

 my $align = $ffi->alignof($type);

Returns the alignment of the given type in bytes.

=head2 kindof



( run in 1.363 second using v1.01-cache-2.11-cpan-71847e10f99 )