more useful options | |
PerlMonks |
Re^10: Inline::C and NULL pointersby etj (Deacon) |
on Dec 21, 2021 at 14:52 UTC ( [id://11139805]=note: print w/replies, xml ) | Need Help?? |
In general C programming, one doesn't have optional arguments. And generally, being able to give a pointer value that is clearly not intended as valid (a NULL) is a valuable thing. That maps very nicely for a Perl interface, to turning an undef input (or, conceivably, no input at all) into a NULL in C terms.
tl;dr: C and Perl have different idioms, and while XS should probably take an SV* and treat it idiomatically, actual C has different needs.
In Section
Seekers of Perl Wisdom
|
|