We don't bite newbies here... much | |
PerlMonks |
Re^5: Why not perl have raw/native typeby dave_the_m (Monsignor) |
on Jan 10, 2020 at 21:28 UTC ( [id://11111307]=note: print w/replies, xml ) | Need Help?? |
You call a sub which is declared as accepting an integer arg - so perl pushes an int value dircectly onto the stack rather than the usual pointer to SV. But if someone in the meantime has redefined foo() to be a sub accepting a normal SV argument, then perl won't just do the wrong thing - it will likely crash with a SEGV, or even be a security hole, when it tries to interpret that integer value as the address of an SV.
Dave.
In Section
Seekers of Perl Wisdom
|
|