summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-12-05 06:07:51 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-12-05 09:36:10 -0800
commit235fc0448781935a0881cec712da57f29b35d9a9 (patch)
treef0b8604cefd795d18cbab27120fd00d0bfd1bf34 /sv.h
parent14ca8ff4550183227342256bd45185f428ac400d (diff)
downloadperl-235fc0448781935a0881cec712da57f29b35d9a9.tar.gz
sv.h: Warning about cows in SvPV_set apidocs
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 2576a651d8..bea0a2f9fc 100644
--- a/sv.h
+++ b/sv.h
@@ -757,7 +757,12 @@ C<SvIV_set> instead of the lvalue assignment to C<SvIVX>.
Set the value of the NV pointer in sv to val. See C<SvIV_set>.
=for apidoc Am|void|SvPV_set|SV* sv|char* val
-Set the value of the PV pointer in sv to val. See C<SvIV_set>.
+Set the value of the PV pointer in sv to val. See also C<SvIV_set>.
+
+Beware that the existing pointer may be involved in copy-on-write or other
+mischief, so do C<SvOOK_off(sv)> and use C<sv_force_normal> or
+C<SvPV_force> (or check the SvIsCOW flag) first to make sure this
+modification is safe.
=for apidoc Am|void|SvUV_set|SV* sv|UV val
Set the value of the UV pointer in sv to val. See C<SvIV_set>.