summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-29 08:48:12 -0600
committerKarl Williamson <khw@cpan.org>2021-12-16 09:31:39 -0700
commit3329a50e1cc56e2c211883081285748d4b66a895 (patch)
tree87c21b15703a02d91eeb14e87246d117116a26ed
parent92ca2349051b948d915e3fc721e3cbb97e7271e2 (diff)
downloadperl-3329a50e1cc56e2c211883081285748d4b66a895.tar.gz
perlapio: binmode() and apply_layers() require pTHX
These two functions, unlike all the rest, require the thread context parameter to be explicitly passed. This commit makes the documentation be accurate.
-rw-r--r--pod/perlapio.pod12
1 files changed, 6 insertions, 6 deletions
diff --git a/pod/perlapio.pod b/pod/perlapio.pod
index 3f0b55f9b2..6661684c01 100644
--- a/pod/perlapio.pod
+++ b/pod/perlapio.pod
@@ -62,9 +62,9 @@ perlapio - perl's IO abstraction interface.
FILE *PerlIO_findFILE(PerlIO *f);
void PerlIO_releaseFILE(PerlIO *f,FILE *stdio);
- int PerlIO_apply_layers(PerlIO *f, const char *mode,
+ int PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode,
const char *layers);
- int PerlIO_binmode(PerlIO *f, int ptype, int imode,
+ int PerlIO_binmode(pTHX_ PerlIO *f, int ptype, int imode,
const char *layers);
void PerlIO_debug(const char *fmt,...);
@@ -499,14 +499,14 @@ happened to C<read()> (or whatever) last time IO was requested.
=over 4
-=item PerlIO_apply_layers(f,mode,layers)
+=item PerlIO_apply_layers(aTHX_ f,mode,layers)
The new interface to the USE_PERLIO implementation. The layers ":crlf"
and ":raw" are only ones allowed for other implementations and those
are silently ignored. (As of perl5.8 ":raw" is deprecated.) Use
PerlIO_binmode() below for the portable case.
-=item PerlIO_binmode(f,ptype,imode,layers)
+=item PerlIO_binmode(aTHX_ f,ptype,imode,layers)
The hook used by perl's C<binmode> operator.
B<ptype> is perl's character for the kind of IO:
@@ -529,9 +529,9 @@ of passing NULL.)
Portable cases are:
- PerlIO_binmode(f,ptype,O_BINARY,NULL);
+ PerlIO_binmode(aTHX_ f,ptype,O_BINARY,NULL);
and
- PerlIO_binmode(f,ptype,O_TEXT,":crlf");
+ PerlIO_binmode(aTHX_ f,ptype,O_TEXT,":crlf");
On Unix these calls probably have no effect whatsoever. Elsewhere
they alter "\n" to CR,LF translation and possibly cause a special text