in reply to Why do I need storing ax over ENTER/SAVETMPS -- FREETMPS/LEAVE?
Why is it necessary to save ax
As you're in an XSUB, the ax variable has automatically been setup (by xsubpp) to indicate the stack base offset, which is used by macros like ST and XSRETURN. It's usually a good idea to restore the variable to its original value after you've been messing with it, or else an ST/XSRETURN call further down might do bad things...
Also see section Variables created by "xsubpp"... in perlapi.
|
|---|