diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-12-04 21:59:07 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-05 09:36:09 -0800 |
commit | 615e0a48731ea26b42cfaf932fb88fd71387df37 (patch) | |
tree | 36c9da1153fe53d37fcfdcdaf5bdd66a0c213a11 | |
parent | f318c24d5fe0afd05d6f929510f6e068ea7f7fc7 (diff) | |
download | perl-615e0a48731ea26b42cfaf932fb88fd71387df37.tar.gz |
toke.c apidocs: Note that scan_vstring might croak
-rw-r--r-- | toke.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 * |