summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 15:06:18 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 15:06:18 +0000
commit49d8d3a1123fb996c090905424ed66f675b3df17 (patch)
tree6627148f7da2ca11dda917d271656821eb0b0a79 /pp_ctl.c
parent69dcf70cb27ded45873eb396cabbcbd82a21a2c8 (diff)
downloadperl-49d8d3a1123fb996c090905424ed66f675b3df17.tar.gz
More Chip patches:
Subject: [PATCH] Fix SEGV from combining caller and C<package;> Date: Thu, 5 Feb 1998 21:47:50 -0500 (EST) Subject: [PATCH] Fix line numbers after here documents in eval STRING Date: Thu, 5 Feb 1998 21:50:08 -0500 (EST) Subject: [PATCH] Make recursive lexical analysis more robust Date: Thu, 5 Feb 1998 21:57:02 -0500 (EST) p4raw-id: //depot/perl@464
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index acf6f01689..a4135c64c9 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1134,6 +1134,7 @@ PP(pp_caller)
register PERL_CONTEXT *cx;
I32 dbcxix;
I32 gimme;
+ HV *hv;
SV *sv;
I32 count = 0;
@@ -1163,14 +1164,22 @@ PP(pp_caller)
}
if (GIMME != G_ARRAY) {
- dTARGET;
-
- sv_setpv(TARG, HvNAME(cx->blk_oldcop->cop_stash));
- PUSHs(TARG);
+ hv = cx->blk_oldcop->cop_stash;
+ if (!hv)
+ PUSHs(&sv_undef);
+ else {
+ dTARGET;
+ sv_setpv(TARG, HvNAME(hv));
+ PUSHs(TARG);
+ }
RETURN;
}
- PUSHs(sv_2mortal(newSVpv(HvNAME(cx->blk_oldcop->cop_stash), 0)));
+ hv = cx->blk_oldcop->cop_stash;
+ if (!hv)
+ PUSHs(&sv_undef);
+ else
+ PUSHs(sv_2mortal(newSVpv(HvNAME(hv), 0)));
PUSHs(sv_2mortal(newSVpv(SvPVX(GvSV(cx->blk_oldcop->cop_filegv)), 0)));
PUSHs(sv_2mortal(newSViv((I32)cx->blk_oldcop->cop_line)));
if (!MAXARG)