The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

Implements "ENTER" in perlapi

Implements "LEAVE" in perlapi

Implements SAVEGENERICSV.

Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to restore a global SV to its prior contents, freeing new value.

Implements SAVEGENERICPV.

Like save_pptr(), but also Safefree()s the new value if it is different from the old one. Can be used to restore a global char* to its prior contents, freeing new value.

Implements SAVESHAREDPV.

Like save_generic_pvref(), but uses PerlMemShared_free() rather than Safefree(). Can be used to restore a shared global char* to its prior contents, freeing new value.

Implements SAVESETSVFLAGS.

Set the SvFLAGS specified by mask to the values in val

Saves the current GP of gv on the save stack to be restored on scope exit.

If empty is true, replace the GP with a new GP.

If empty is false, mark gv with GVf_INTRO so the next reference assigned is localized, which is how local *foo = $someref; works.

Implements SAVEVPTR.

Implements SAVEPADSVANDMORTALIZE.

Implements SAVEHDELETE.

Implements SAVEADELETE.

Implements SAVEHINTS.

Implements "SSNEW" in perlapi and kin, which should be used instead of this function.

Implements LEAVE_SCOPE which you should use instead.