diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-06-20 20:04:01 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-06-20 20:04:01 +0000 |
commit | 2dc2558e5965ed21842375d8cc89de68e0c966e2 (patch) | |
tree | be9b2b2eef6a362979086203829aeb8078accd53 /perliol.h | |
parent | a33cf58c90e96ed3c4b1c1fdbaf666d924440940 (diff) | |
download | perl-2dc2558e5965ed21842375d8cc89de68e0c966e2.tar.gz |
PerlIO Layer implementation future proofing.
- Inspired by Nick C's suggestion add size of function table to the table
as a validation check.
- also optimize pseudo-layer code to avoid malloc/link of something
destined to be immediately popped & freed.
- Minor addition to pod/perliol.pod
p4raw-id: //depot/perlio@17330
Diffstat (limited to 'perliol.h')
-rw-r--r-- | perliol.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -14,10 +14,11 @@ struct PerlIO_list_s { }; struct _PerlIO_funcs { + Size_t fsize; char *name; Size_t size; U32 kind; - IV (*Pushed) (pTHX_ PerlIO *f, const char *mode, SV *arg); + IV (*Pushed) (pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab); IV (*Popped) (pTHX_ PerlIO *f); PerlIO *(*Open) (pTHX_ PerlIO_funcs *tab, PerlIO_list_t *layers, IV n, @@ -124,7 +125,7 @@ extern SV *PerlIO_arg_fetch(PerlIO_list_t *av, IV n); extern IV PerlIOBase_fileno(pTHX_ PerlIO *f); extern PerlIO *PerlIOBase_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags); -extern IV PerlIOBase_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg); +extern IV PerlIOBase_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab); extern IV PerlIOBase_popped(pTHX_ PerlIO *f); extern IV PerlIOBase_binmode(pTHX_ PerlIO *f); extern SSize_t PerlIOBase_read(pTHX_ PerlIO *f, void *vbuf, Size_t count); @@ -168,7 +169,7 @@ extern PerlIO *PerlIOBuf_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const char *mode, int fd, int imode, int perm, PerlIO *old, int narg, SV **args); -extern IV PerlIOBuf_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg); +extern IV PerlIOBuf_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab); extern IV PerlIOBuf_popped(pTHX_ PerlIO *f); extern PerlIO *PerlIOBuf_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags); extern SSize_t PerlIOBuf_read(pTHX_ PerlIO *f, void *vbuf, Size_t count); |