summaryrefslogtreecommitdiff
path: root/ext/PerlIO/Via/Via.xs
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-06-20 20:04:01 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-06-20 20:04:01 +0000
commit2dc2558e5965ed21842375d8cc89de68e0c966e2 (patch)
treebe9b2b2eef6a362979086203829aeb8078accd53 /ext/PerlIO/Via/Via.xs
parenta33cf58c90e96ed3c4b1c1fdbaf666d924440940 (diff)
downloadperl-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 'ext/PerlIO/Via/Via.xs')
-rw-r--r--ext/PerlIO/Via/Via.xs5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/PerlIO/Via/Via.xs b/ext/PerlIO/Via/Via.xs
index d1ebab2ae3..04c4d48906 100644
--- a/ext/PerlIO/Via/Via.xs
+++ b/ext/PerlIO/Via/Via.xs
@@ -123,9 +123,9 @@ PerlIOVia_method(pTHX_ PerlIO *f,char *method,CV **save,int flags,...)
}
IV
-PerlIOVia_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg)
+PerlIOVia_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab)
{
- IV code = PerlIOBase_pushed(aTHX_ f,mode,Nullsv);
+ IV code = PerlIOBase_pushed(aTHX_ f,mode,Nullsv,tab);
if (code == 0)
{
PerlIOVia *s = PerlIOSelf(f,PerlIOVia);
@@ -559,6 +559,7 @@ PerlIOVia_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
}
PerlIO_funcs PerlIO_object = {
+ sizeof(PerlIO_funcs),
"Via",
sizeof(PerlIOVia),
PERLIO_K_BUFFERED|PERLIO_K_DESTRUCT,