FFI-Platypus-Declare

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    You can also get the size of arrays

     my $intarraysize = sizeof 'int[64]';

    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.

 lang

     lang $language;

    Specifies the foreign language that you will be interfacing with. The
    default is C. The foreign language specified with this attribute
    changes the default native types (for example, if you specify Rust, you
    will get i32 as an alias for sint32 instead of int as you do with C).

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

You can also get the size of arrays

 my $intarraysize = sizeof 'int[64]';

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 lang

 lang $language;

Specifies the foreign language that you will be interfacing with. The
default is C.  The foreign language specified with this attribute
changes the default native types (for example, if you specify
L<Rust|FFI::Platypus::Lang::Rust>, you will get C<i32> as an alias for
C<sint32> instead of C<int> as you do with L<C|FFI::Platypus::Lang::C>).



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