This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
document the append parameter to sv_gets [perl #72244]
authorJesse Luehrs <doy@tozt.net>
Fri, 6 Jul 2012 03:11:34 +0000 (22:11 -0500)
committerJesse Luehrs <doy@tozt.net>
Fri, 6 Jul 2012 03:18:08 +0000 (22:18 -0500)
sv.c

diff --git a/sv.c b/sv.c
index e076ae4..a67368e 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -7611,7 +7611,10 @@ S_sv_gets_read_record(pTHX_ SV *const sv, PerlIO *const fp, I32 append)
 =for apidoc sv_gets
 
 Get a line from the filehandle and store it into the SV, optionally
-appending to the currently-stored string.
+appending to the currently-stored string. If C<append> is not 0, the
+line is appended to the SV instead of overwriting it. C<append> should
+be set to the byte offset that the appended string should start at
+in the SV (typically, C<SvCUR(sv)> is a suitable choice).
 
 =cut
 */