diff options
author | Bram <perl-rt@wizbit.be> | 2008-06-10 20:26:26 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-06-17 11:13:38 +0000 |
commit | 8433848b134d4e61d5135fd8a70d8106025ac6a6 (patch) | |
tree | 1f4ece2adf27300a2e20f1fc53672a98e7ce1eaf /perl.c | |
parent | 8dc00b2f10de49b4d2d4be48279a996698c3f04a (diff) | |
download | perl-8433848b134d4e61d5135fd8a70d8106025ac6a6.tar.gz |
[perl #51370] length($@)>0 for empty $@ if utf8 is in use
From: "Bram via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-18229-1213179984-1708.51370-15-0@perl.org>
(The first patch)
p4raw-id: //depot/perl@34068
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -2679,8 +2679,9 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags) redo_body: CALL_BODY_SUB((OP*)&myop); retval = PL_stack_sp - (PL_stack_base + oldmark); - if (!(flags & G_KEEPERR)) - sv_setpvn(ERRSV,"",0); + if (!(flags & G_KEEPERR)) { + clear_errsv(); + } break; case 1: STATUS_ALL_FAILURE; @@ -2780,8 +2781,9 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags) redo_body: CALL_BODY_EVAL((OP*)&myop); retval = PL_stack_sp - (PL_stack_base + oldmark); - if (!(flags & G_KEEPERR)) - sv_setpvn(ERRSV,"",0); + if (!(flags & G_KEEPERR)) { + clear_errsv(); + } break; case 1: STATUS_ALL_FAILURE; @@ -3559,7 +3561,7 @@ S_init_main_stash(pTHX) gv_SVadd(PL_errgv); #endif sv_grow(ERRSV, 240); /* Preallocate - for immediate signals. */ - sv_setpvn(ERRSV, "", 0); + clear_errsv(); PL_curstash = PL_defstash; CopSTASH_set(&PL_compiling, PL_defstash); PL_debstash = GvHV(gv_fetchpvs("DB::", GV_ADDMULTI, SVt_PVHV)); |