From dfe9444ca7881e716e9e8feaf20b55da491363ca Mon Sep 17 00:00:00 2001 From: Andy Dougherty Date: Tue, 24 Feb 1998 11:02:43 -0500 Subject: Re: ANNOUNCE: perl5.004_60 Configure patch is available p4raw-id: //depot/perl@575 --- pp_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pp_sys.c') diff --git a/pp_sys.c b/pp_sys.c index ec49864120..f90299289a 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -2915,9 +2915,9 @@ PP(pp_telldir) { djSP; dTARGET; #if defined(HAS_TELLDIR) || defined(telldir) -#if !defined(telldir) && !defined(HAS_TELLDIR_PROTOTYPE) && !defined(DONT_DECLARE_STD) +# ifdef NEED_TELLDIR_PROTO /* XXX does _anyone_ need this? --AD 2/20/1998 */ long telldir _((DIR *)); -#endif +# endif GV *gv = (GV*)POPs; register IO *io = GvIOn(gv); -- cgit v1.2.1 From 1d603a678689f1e74cf73914a432b2a8d38be470 Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Fri, 27 Feb 1998 04:15:04 +0000 Subject: _60 & _04 - Add WRITE & CLOSE to TIEHANDLE p4raw-id: //depot/perl@595 --- pp_sys.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'pp_sys.c') diff --git a/pp_sys.c b/pp_sys.c index f90299289a..c273c8c5b2 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -356,11 +356,23 @@ PP(pp_close) { djSP; GV *gv; + MAGIC *mg; if (MAXARG == 0) gv = defoutgv; else gv = (GV*)POPs; + + if (SvRMAGICAL(gv) && (mg = mg_find((SV*)gv, 'q'))) { + PUSHMARK(SP); + XPUSHs(mg->mg_obj); + PUTBACK; + ENTER; + perl_call_method("CLOSE", G_SCALAR); + LEAVE; + SPAGAIN; + RETURN; + } EXTEND(SP, 1); PUSHs(boolSV(do_close(gv, TRUE))); RETURN; @@ -1319,8 +1331,25 @@ PP(pp_send) char *buffer; int length; STRLEN blen; + MAGIC *mg; gv = (GV*)*++MARK; + if (op->op_type == OP_SYSWRITE && + SvRMAGICAL(gv) && (mg = mg_find((SV*)gv, 'q'))) + { + SV *sv; + + PUSHMARK(MARK-1); + *MARK = mg->mg_obj; + ENTER; + perl_call_method("WRITE", G_SCALAR); + LEAVE; + SPAGAIN; + sv = POPs; + SP = ORIGMARK; + PUSHs(sv); + RETURN; + } if (!gv) goto say_undef; bufsv = *++MARK; -- cgit v1.2.1