diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-11 12:48:26 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-11 12:48:26 +0000 |
commit | 38a03e6ea6b9b346c41b9006fbeedc3b0f0130b2 (patch) | |
tree | dfad8700b788597b91a0ada8768e7b083306c4b7 /pp_ctl.c | |
parent | 57d3b86dc9b74a9b2d9e24c40494104c74f62be7 (diff) | |
download | perl-38a03e6ea6b9b346c41b9006fbeedc3b0f0130b2.tar.gz |
Fix up $@ (ERRSV now refers to GvSV(errgv) for non-threaded perl and
thr->errsv for threaded perl). Fix pp_tie and pp_dbmopen to use
GvCV(gv) instead of gv so AUTOLOAD stuff works. All tests now pass
again for non-threaded perl. Enhanced perl_get_sv to return
per-thread magicals where necessary for threaded perl.
p4raw-id: //depot/perl@228
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1040,21 +1040,21 @@ char *message; SV **svp; STRLEN klen = strlen(message); - svp = hv_fetch(errhv, message, klen, TRUE); + svp = hv_fetch(ERRHV, message, klen, TRUE); if (svp) { if (!SvIOK(*svp)) { static char prefix[] = "\t(in cleanup) "; sv_upgrade(*svp, SVt_IV); (void)SvIOK_only(*svp); - SvGROW(errsv, SvCUR(errsv)+sizeof(prefix)+klen); - sv_catpvn(errsv, prefix, sizeof(prefix)-1); - sv_catpvn(errsv, message, klen); + SvGROW(ERRSV, SvCUR(ERRSV)+sizeof(prefix)+klen); + sv_catpvn(ERRSV, prefix, sizeof(prefix)-1); + sv_catpvn(ERRSV, message, klen); } sv_inc(*svp); } } else - sv_setpv(errsv, message); + sv_setpv(ERRSV, message); cxix = dopoptoeval(cxstack_ix); if (cxix >= 0) { @@ -1077,7 +1077,7 @@ char *message; LEAVE; if (optype == OP_REQUIRE) { - char* msg = SvPV(errsv, na); + char* msg = SvPVx(ERRSV, na); DIE("%s", *msg ? msg : "Compilation failed in require"); } return pop_return(); @@ -2197,7 +2197,7 @@ int gimme; if (saveop->op_flags & OPf_SPECIAL) in_eval |= 4; else - sv_setpv(errsv,""); + sv_setpv(ERRSV,""); if (yyparse() || error_count || !eval_root) { SV **newsp; I32 gimme; @@ -2216,7 +2216,7 @@ int gimme; lex_end(); LEAVE; if (optype == OP_REQUIRE) { - char* msg = SvPV(errsv, na); + char* msg = SvPVx(ERRSV, na); DIE("%s", *msg ? msg : "Compilation failed in require"); } SvREFCNT_dec(rs); @@ -2570,7 +2570,7 @@ PP(pp_leaveeval) LEAVE; if (!(save_flags & OPf_SPECIAL)) - sv_setpv(errsv,""); + sv_setpv(ERRSV,""); RETURNOP(retop); } @@ -2590,7 +2590,7 @@ PP(pp_entertry) eval_root = op; /* Only needed so that goto works right. */ in_eval = 1; - sv_setpv(errsv,""); + sv_setpv(ERRSV,""); PUTBACK; return DOCATCH(op->op_next); } @@ -2638,7 +2638,7 @@ PP(pp_leavetry) curpm = newpm; /* Don't pop $1 et al till now */ LEAVE; - sv_setpv(errsv,""); + sv_setpv(ERRSV,""); RETURN; } |