This uses the superb Inline, and specifically the
use Inline with =>...
feature, to show the size of C data structures. The sample shown is from PDL.
perl -Mblib -MInline=with,PDL -MInline=C,'size_t f() { return sizeof(struct pdl); }' -E 'say f()'
Comment on
One-liner to show C struct sizes using Inline
Select
or
Download
Code
Back to
Cool Uses for Perl