summaryrefslogtreecommitdiff
path: root/perliol.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-06-13 15:22:01 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-06-13 15:22:01 +0000
commitfcf2db383b9625d65c84a8308e9be05a073bed3b (patch)
tree81049ba7ea49f0adea3df356ac7617c0d630147d /perliol.h
parente3dc9c7ad43521350854f6cfc892def6c853f938 (diff)
downloadperl-fcf2db383b9625d65c84a8308e9be05a073bed3b.tar.gz
Avoid AV and HV in perlio.c by inventing PerlIO_list_t which is AV-ish
and using that instead (name lookups are sequential search for now). p4raw-id: //depot/perlio@10564
Diffstat (limited to 'perliol.h')
-rw-r--r--perliol.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/perliol.h b/perliol.h
index 0bdff471dd..e9f6a975bb 100644
--- a/perliol.h
+++ b/perliol.h
@@ -1,6 +1,20 @@
#ifndef _PERLIOL_H
#define _PERLIOL_H
+typedef struct
+{
+ PerlIO_funcs *funcs;
+ SV *arg;
+} PerlIO_pair_t;
+
+typedef struct
+{
+ IV refcnt;
+ IV cur;
+ IV len;
+ PerlIO_pair_t *array;
+} PerlIO_list_t;
+
struct _PerlIO_funcs
{
char * name;
@@ -9,7 +23,7 @@ struct _PerlIO_funcs
IV (*Pushed)(PerlIO *f,const char *mode,SV *arg);
IV (*Popped)(PerlIO *f);
PerlIO * (*Open)(pTHX_ PerlIO_funcs *tab,
- AV *layers, IV n,
+ PerlIO_list_t *layers, IV n,
const char *mode,
int fd, int imode, int perm,
PerlIO *old,
@@ -95,8 +109,8 @@ EXT PerlIO_funcs PerlIO_mmap;
#endif
extern PerlIO *PerlIO_allocate(pTHX);
-extern SV *PerlIO_arg_fetch(pTHX_ AV *av,IV n);
-#define PerlIOArg PerlIO_arg_fetch(aTHX_ layers,n+1)
+extern SV *PerlIO_arg_fetch(PerlIO_list_t *av,IV n);
+#define PerlIOArg PerlIO_arg_fetch(layers,n)
#if O_BINARY != O_TEXT
#define PERLIO_STDTEXT "t"
@@ -139,7 +153,7 @@ typedef struct
IV oneword; /* Emergency buffer */
} PerlIOBuf;
-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 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 (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);