summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-05 19:07:12 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-05 19:07:12 +0000
commitae8cc45f19735266b98e68ac96abd0c5050c140f (patch)
tree2a7bb46f4e08a63e1a40ec2c267201e32414866e /gv.h
parent4164be692ecdc110086abd011eb6e1c41f13ed34 (diff)
downloadperl-ae8cc45f19735266b98e68ac96abd0c5050c140f.tar.gz
Perl_gv_name_set should not leak the old HEK. Allow the flag GV_ADD
to simplify GV initialisation. p4raw-id: //depot/perl@27382
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gv.h b/gv.h
index e3611c6e56..f48cb15475 100644
--- a/gv.h
+++ b/gv.h
@@ -187,7 +187,9 @@ Return the SV from the GV.
/*
* symbol creation flags, for use in gv_fetchpv() and get_*v()
*/
-#define GV_ADD 0x01 /* add, if symbol not already there */
+#define GV_ADD 0x01 /* add, if symbol not already there
+ For gv_name_set, adding a HEK for the first
+ time, so don't try to free what's there. */
#define GV_ADDMULTI 0x02 /* add, pretending it has been added already */
#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */
#define GV_ADDINEVAL 0x08 /* add, as though we're doing so within an eval */