develooper Front page | perl.perl5.porters | Postings from December 2011

[perl #72244] perlapi.pod docs sv_gets() append parameter unclear

James E Keenan via RT
December 11, 2011 10:37
[perl #72244] perlapi.pod docs sv_gets() append parameter unclear
Message ID:
On Wed Jan 20 13:40:42 2010, kryde wrote:
> In perlapi.pod the docs of sv_gets() doesn't say what the "append"
> parameter should be to have an append.  Is it a boolean, or is it a
> position to store to?
> From I bit of experimenting I guess utf8 and "fast" buffered handles
> take it as a byte position, and the unbuffered handle case uses it as
> a boolean.  Everywhere I could spot in perl itself passes either 0 or
> SvCUR(sv), so the two interpretations behave the same ...

For reference for anyone who can address this ticket, from 'perlapi'
from 5.14.2:
sv_gets: Get a line from the filehandle and store it into the SV,
optionally appending to the currently-stored string.

    char*   sv_gets(SV *const sv, PerlIO *const fp, I32 append)
#### Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About