summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-07-11 15:41:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-11 15:41:32 +0000
commitb9d6bf1307347f5c042490ec06edac847e8ada07 (patch)
tree9fe8792d4531acf8cf256f678ff5f1312bdf6eef /perlio.c
parent6700e351e95075f6f63aa2e498858d6df40b447c (diff)
downloadperl-b9d6bf1307347f5c042490ec06edac847e8ada07.tar.gz
Document better the PerlIO_{export,release,import}FILE()
relationships (or the lack thereof). p4raw-id: //depot/perl@17485
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index b0d2f8ce49..11f600fc5f 100644
--- a/perlio.c
+++ b/perlio.c
@@ -337,6 +337,7 @@ PerlIO_init(pTHX)
sfset(sfstdout, SF_SHARE, 0);
}
+/* This is not the reverse of PerlIO_exportFILE(), PerlIO_releaseFILE() is. */
PerlIO *
PerlIO_importFILE(FILE *stdio, const char *mode)
{
@@ -3038,6 +3039,8 @@ PerlIO_funcs PerlIO_stdio = {
#endif /* USE_STDIO_PTR */
};
+/* Note that calls to PerlIO_exportFILE() are reversed using
+ * PerlIO_releaseFILE(), not importFILE. */
FILE *
PerlIO_exportFILE(PerlIO * f, const char *mode)
{
@@ -3085,6 +3088,7 @@ PerlIO_findFILE(PerlIO *f)
return PerlIO_exportFILE(f, Nullch);
}
+/* Use this to reverse PerlIO_exportFILE calls. */
void
PerlIO_releaseFILE(PerlIO *p, FILE *f)
{