summaryrefslogtreecommitdiff
path: root/perliol.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-03-23 20:49:02 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-03-23 20:49:02 +0000
commite3f3bf95bcb81efe35cb0f0d3e3528d5c002dcec (patch)
tree090c6552ac62310d43952cdb36996c0e1a5e1f69 /perliol.h
parent1141d9f89ca1cb89e46951e8afc784c7b4862cd2 (diff)
downloadperl-e3f3bf95bcb81efe35cb0f0d3e3528d5c002dcec.tar.gz
Perlio internals re-organized.
- open process creates AV of layer/arg pairs (appends layers from open() or open.pm to default list). - push arg is now an SV. - layer ->Open get passed the AV - open is no longer mandatory method. - topmost layer that has ->Open method does the open - any layers above are pushed once that returns. - vtable re-ordered so dummy layers need only provide push/pop methods. p4raw-id: //depot/perlio@9314
Diffstat (limited to 'perliol.h')
-rw-r--r--perliol.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/perliol.h b/perliol.h
index d97df31160..78c80f4d8b 100644
--- a/perliol.h
+++ b/perliol.h
@@ -6,10 +6,16 @@ struct _PerlIO_funcs
char * name;
Size_t size;
IV kind;
- IV (*Fileno)(PerlIO *f);
- PerlIO * (*Open)(pTHX_ PerlIO_funcs *tab, const char *mode, int fd, int imode, int perm, PerlIO *old, int narg, SV **args);
- IV (*Pushed)(PerlIO *f,const char *mode,const char *arg,STRLEN len);
+ IV (*Pushed)(PerlIO *f,const char *mode,SV *arg);
IV (*Popped)(PerlIO *f);
+ PerlIO * (*Open)(pTHX_ PerlIO_funcs *tab,
+ AV *layers, IV n,
+ const char *mode,
+ int fd, int imode, int perm,
+ PerlIO *old,
+ int narg, SV **args);
+ SV * (*Getarg)(PerlIO *f);
+ IV (*Fileno)(PerlIO *f);
/* Unix-like functions - cf sfio line disciplines */
SSize_t (*Read)(PerlIO *f, void *vbuf, Size_t count);
SSize_t (*Unread)(PerlIO *f, const void *vbuf, Size_t count);
@@ -98,7 +104,7 @@ extern PerlIO *PerlIO_allocate(pTHX);
/* Generic, or stub layer functions */
extern IV PerlIOBase_fileno (PerlIO *f);
-extern IV PerlIOBase_pushed (PerlIO *f, const char *mode,const char *arg,STRLEN len);
+extern IV PerlIOBase_pushed (PerlIO *f, const char *mode,SV *arg);
extern IV PerlIOBase_popped (PerlIO *f);
extern SSize_t PerlIOBase_unread (PerlIO *f, const void *vbuf, Size_t count);
extern IV PerlIOBase_eof (PerlIO *f);
@@ -129,7 +135,8 @@ typedef struct
IV oneword; /* Emergency buffer */
} PerlIOBuf;
-extern PerlIO * PerlIOBuf_open (pTHX_ PerlIO_funcs *self, const char *mode, int fd, int imode, int perm, PerlIO *old, int narg, SV **args);
+extern PerlIO * PerlIOBuf_open (pTHX_ PerlIO_funcs *self, AV *layers, IV n, const char *mode, int fd, int imode, int perm, PerlIO *old, int narg, SV **args);
+extern IV PerlIOBuf_pushed (PerlIO *f, const char *mode,SV *arg);
extern SSize_t PerlIOBuf_read (PerlIO *f, void *vbuf, Size_t count);
extern SSize_t PerlIOBuf_unread (PerlIO *f, const void *vbuf, Size_t count);
extern SSize_t PerlIOBuf_write (PerlIO *f, const void *vbuf, Size_t count);