Keep It Simple, Stupid | |
PerlMonks |
One-liner to show C struct sizes using Inlineby etj (Deacon) |
on Aug 29, 2021 at 02:15 UTC ( [id://11136166]=CUFP: print w/replies, xml ) | Need Help?? |
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()'
Back to
Cool Uses for Perl
|
|