From: Perl 5 Porters Date: Thu, 29 Aug 1996 13:14:51 +0000 (+0200) Subject: perl 5.003_05: pp_hot.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e79b05116c7f6dd4a9d984471401ae61fd054c7d;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_05: pp_hot.c Date: Thu, 05 Sep 1996 00:25:28 -0400 From: Gurusamy Sarathy Subject: minor misc. cleanup This patch makes some minor cleanups to the sources. No change in functionality whatsoever. Date: Thu, 29 Aug 1996 15:14:51 +0200 From: Sven Verdoolaege Subject: more TIEHANDLE This adds support for a READLINE method. --- diff --git a/pp_hot.c b/pp_hot.c index 4cd9eb1..bf33ab8 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -967,7 +967,19 @@ do_readline() PerlIO *fp; register IO *io = GvIO(last_in_gv); register I32 type = op->op_type; + MAGIC *mg; + if (SvMAGICAL(last_in_gv) && (mg = mg_find((SV*)last_in_gv, 'q'))) { + PUSHMARK(SP); + XPUSHs(mg->mg_obj); + PUTBACK; + ENTER; + perl_call_method("READLINE", GIMME); + LEAVE; + SPAGAIN; + if (GIMME == G_SCALAR) sv_setsv(TARG, TOPs); + RETURN; + } fp = Nullfp; if (io) { fp = IoIFP(io); @@ -1225,7 +1237,6 @@ PP(pp_enter) PP(pp_helem) { dSP; - SV** svp; HE* he; SV *keysv = POPs; HV *hv = (HV*)POPs;