diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-08-29 15:14:51 +0200 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-08-29 15:14:51 +0200 |
commit | e79b05116c7f6dd4a9d984471401ae61fd054c7d (patch) | |
tree | 11c05a210a3822c59653212cdf33fd818b4d1bb4 | |
parent | 1e11cddc85856dc36c8916d69f33899971799644 (diff) | |
download | perl-e79b05116c7f6dd4a9d984471401ae61fd054c7d.tar.gz |
perl 5.003_05: pp_hot.c
Date: Thu, 05 Sep 1996 00:25:28 -0400
From: Gurusamy Sarathy <gsar@engin.umich.edu>
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 <skimo@breughel.ufsia.ac.be>
Subject: more TIEHANDLE
This adds support for a READLINE method.
-rw-r--r-- | pp_hot.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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; |