summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-12-04 21:59:07 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-12-05 09:36:09 -0800
commit615e0a48731ea26b42cfaf932fb88fd71387df37 (patch)
tree36c9da1153fe53d37fcfdcdaf5bdd66a0c213a11
parentf318c24d5fe0afd05d6f929510f6e068ea7f7fc7 (diff)
downloadperl-615e0a48731ea26b42cfaf932fb88fd71387df37.tar.gz
toke.c apidocs: Note that scan_vstring might croak
-rw-r--r--toke.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index b60d7204be..7b6f194010 100644
--- a/toke.c
+++ b/toke.c
@@ -11537,13 +11537,18 @@ vstring, as well as updating the passed in sv.
Function must be called like
- sv = newSV(5);
+ sv = sv_2mortal(newSV(5));
s = scan_vstring(s,e,sv);
where s and e are the start and end of the string.
The sv should already be large enough to store the vstring
passed in, for performance reasons.
+This function may croak if fatal warnings are enabled in the
+calling scope, hence the sv_2mortal in the example (to prevent
+a leak). Make sure to do SvREFCNT_inc afterwards if you use
+sv_2mortal.
+
*/
char *