summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>2002-10-02 17:48:59 -0400
committerAbhijit Menon-Sen <ams@wiw.org>2002-10-03 01:40:51 +0000
commit1301793579656d41ef345218fe1021d8c3d9671f (patch)
tree2c5effb502c5c5ed7fbb17973957706f2ce23688 /pp.c
parentaf685957336d0a37645ff959496386c489e0b52a (diff)
downloadperl-1301793579656d41ef345218fe1021d8c3d9671f.tar.gz
Re: speed of my
Message-Id: <15771.41483.524281.299958@syllepsis.MIT.EDU> p4raw-id: //depot/perl@17968
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index d2c462e95a..5cc15815ec 100644
--- a/pp.c
+++ b/pp.c
@@ -19,8 +19,6 @@
#include "reentr.h"
-/* variations on pp_null */
-
/* XXX I can't imagine anyone who doesn't have this actually _needs_
it, since pid_t is an integral type.
--AD 2/20/1998
@@ -29,6 +27,8 @@
extern Pid_t getpid (void);
#endif
+/* variations on pp_null */
+
PP(pp_stub)
{
dSP;
@@ -47,6 +47,7 @@ PP(pp_scalar)
PP(pp_padav)
{
dSP; dTARGET;
+ I32 gimme;
if (PL_op->op_private & OPpLVAL_INTRO)
SAVECLEARSV(PAD_SVl(PL_op->op_targ));
EXTEND(SP, 1);
@@ -59,7 +60,8 @@ PP(pp_padav)
PUSHs(TARG);
RETURN;
}
- if (GIMME == G_ARRAY) {
+ gimme = GIMME_V;
+ if (gimme == G_ARRAY) {
I32 maxarg = AvFILL((AV*)TARG) + 1;
EXTEND(SP, maxarg);
if (SvMAGICAL(TARG)) {
@@ -74,7 +76,7 @@ PP(pp_padav)
}
SP += maxarg;
}
- else {
+ else if (gimme == G_SCALAR) {
SV* sv = sv_newmortal();
I32 maxarg = AvFILL((AV*)TARG) + 1;
sv_setiv(sv, maxarg);