summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-12-17 15:27:46 +1100
committerTony Cook <tony@develop-help.com>2015-12-17 15:27:46 +1100
commit364bbfa41090431b5fedf27a0b86684bb09ff167 (patch)
treef2b355700a301877ffce5ac0dda982a3beb2bd2e /scope.c
parentdc9ef9989ca4dc4207da49f653e8789816f50a11 (diff)
downloadperl-364bbfa41090431b5fedf27a0b86684bb09ff167.tar.gz
document save_gp() and the GVf_INTRO flag
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index e5687f4ac2..c08eda06c8 100644
--- a/scope.c
+++ b/scope.c
@@ -298,6 +298,19 @@ Perl_save_set_svflags(pTHX_ SV* sv, U32 mask, U32 val)
SS_ADD_END(4);
}
+/*
+=for apidoc save_gp
+
+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 C< local *foo = $someref; > works.
+
+=cut
+*/
+
void
Perl_save_gp(pTHX_ GV *gv, I32 empty)
{