Skip to content

Commit 79ae12a

Browse files
Leontmauke
authored andcommitted
Stop calling Perl_die manually
Call die() instead.
1 parent 153ebd6 commit 79ae12a

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

Diff for: builtin.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ XS(XS_builtin_func1_scalar)
221221
break;
222222

223223
default:
224-
Perl_die(aTHX_ "panic: unhandled opcode %" IVdf
224+
die("panic: unhandled opcode %" IVdf
225225
" for xs_builtin_func1_scalar()", (IV) ix);
226226
}
227227

@@ -392,7 +392,7 @@ XS(XS_builtin_func1_void)
392392
break;
393393

394394
default:
395-
Perl_die(aTHX_ "panic: unhandled opcode %" IVdf
395+
die("panic: unhandled opcode %" IVdf
396396
" for xs_builtin_func1_void()", (IV) ix);
397397
}
398398

Diff for: doio.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -2632,11 +2632,11 @@ Perl_apply(pTHX_ I32 type, SV **mark, SV **sp)
26322632
platforms where kill was not defined. */
26332633
#ifndef HAS_KILL
26342634
if (type == OP_KILL)
2635-
Perl_die(aTHX_ PL_no_func, what);
2635+
die(PL_no_func, what);
26362636
#endif
26372637
#ifndef HAS_CHOWN
26382638
if (type == OP_CHOWN)
2639-
Perl_die(aTHX_ PL_no_func, what);
2639+
die(PL_no_func, what);
26402640
#endif
26412641

26422642

@@ -2675,7 +2675,7 @@ Perl_apply(pTHX_ I32 type, SV **mark, SV **sp)
26752675
} else if (fchmod(fd, val))
26762676
tot--;
26772677
#else
2678-
Perl_die(aTHX_ PL_no_func, "fchmod");
2678+
die(PL_no_func, "fchmod");
26792679
#endif
26802680
}
26812681
else {
@@ -2716,7 +2716,7 @@ Perl_apply(pTHX_ I32 type, SV **mark, SV **sp)
27162716
} else if (fchown(fd, val, val2))
27172717
tot--;
27182718
#else
2719-
Perl_die(aTHX_ PL_no_func, "fchown");
2719+
die(PL_no_func, "fchown");
27202720
#endif
27212721
}
27222722
else {
@@ -2908,7 +2908,7 @@ nothing in the core.
29082908
} else if (futimes(fd, (struct timeval *) utbufp))
29092909
tot--;
29102910
#else
2911-
Perl_die(aTHX_ PL_no_func, "futimes");
2911+
die(PL_no_func, "futimes");
29122912
#endif
29132913
}
29142914
else {

Diff for: gv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3107,7 +3107,7 @@ Perl_gp_free(pTHX_ GV *gv)
31073107
&& !gp->gp_form) break;
31083108

31093109
if (--attempts == 0) {
3110-
Perl_die(aTHX_
3110+
die(
31113111
"panic: gp_free failed to free glob pointer - "
31123112
"something is repeatedly re-creating entries"
31133113
);

Diff for: hv.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -3499,7 +3499,7 @@ Perl_hv_placeholders_p(pTHX_ HV *hv)
34993499
mg = sv_magicext(MUTABLE_SV(hv), 0, PERL_MAGIC_rhash, 0, 0, 0);
35003500

35013501
if (!mg) {
3502-
Perl_die(aTHX_ "panic: hv_placeholders_p");
3502+
die("panic: hv_placeholders_p");
35033503
}
35043504
}
35053505
return &(mg->mg_len);
@@ -3543,7 +3543,7 @@ Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph)
35433543
mg->mg_len = ph;
35443544
} else if (ph) {
35453545
if (!sv_magicext(MUTABLE_SV(hv), 0, PERL_MAGIC_rhash, 0, 0, ph))
3546-
Perl_die(aTHX_ "panic: hv_placeholders_set");
3546+
die("panic: hv_placeholders_set");
35473547
}
35483548
/* else we don't need to add magic to record 0 placeholders. */
35493549
}

Diff for: mg.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ Perl_magic_set_all_env(pTHX_ SV *sv, MAGIC *mg)
14401440
PERL_ARGS_ASSERT_MAGIC_SET_ALL_ENV;
14411441
PERL_UNUSED_ARG(mg);
14421442
#if defined(VMS)
1443-
Perl_die(aTHX_ "Can't make list assignment to %%ENV on this system");
1443+
die("Can't make list assignment to %%ENV on this system");
14441444
#else
14451445
if (PL_localizing) {
14461446
HE* entry;
@@ -1463,7 +1463,7 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
14631463
PERL_UNUSED_ARG(sv);
14641464
PERL_UNUSED_ARG(mg);
14651465
#if defined(VMS)
1466-
Perl_die(aTHX_ "Can't make list assignment to %%ENV on this system");
1466+
die("Can't make list assignment to %%ENV on this system");
14671467
#else
14681468
my_clearenv();
14691469
#endif

Diff for: pp.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict,
115115
sv = MUTABLE_SV(gv);
116116
}
117117
else if (!isGV_with_GP(sv)) {
118-
Perl_die(aTHX_ "Not a GLOB reference");
118+
die("Not a GLOB reference");
119119
}
120120
}
121121
else {
@@ -143,7 +143,7 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict,
143143
goto wasref;
144144
}
145145
if (PL_op->op_flags & OPf_REF || strict) {
146-
Perl_die(aTHX_ PL_no_usym, "a symbol");
146+
die(PL_no_usym, "a symbol");
147147
}
148148
if (ckWARN(WARN_UNINITIALIZED))
149149
report_uninit(sv);
@@ -158,7 +158,7 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict,
158158
}
159159
else {
160160
if (strict) {
161-
Perl_die(aTHX_
161+
die(
162162
PL_no_symref_sv,
163163
sv,
164164
(SvPOKp(sv) && SvCUR(sv)>32 ? "..." : ""),
@@ -223,16 +223,16 @@ Perl_softref2xv(pTHX_ SV *const sv, const char *const what,
223223

224224
if (PL_op->op_private & HINT_STRICT_REFS) {
225225
if (SvOK(sv))
226-
Perl_die(aTHX_ PL_no_symref_sv, sv,
226+
die(PL_no_symref_sv, sv,
227227
(SvPOKp(sv) && SvCUR(sv)>32 ? "..." : ""), what);
228228
else
229-
Perl_die(aTHX_ PL_no_usym, what);
229+
die(PL_no_usym, what);
230230
}
231231
if (!SvOK(sv)) {
232232
if (
233233
PL_op->op_flags & OPf_REF
234234
)
235-
Perl_die(aTHX_ PL_no_usym, what);
235+
die(PL_no_usym, what);
236236
if (ckWARN(WARN_UNINITIALIZED))
237237
report_uninit(sv);
238238
if (type != SVt_PV && GIMME_V == G_LIST) {

Diff for: pp_ctl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6767,7 +6767,7 @@ S_doparseform(pTHX_ SV *sv)
67676767
mg->mg_flags |= MGf_REFCOUNTED;
67686768

67696769
if (unchopnum && repeat)
6770-
Perl_die(aTHX_ "Repeated format line will never terminate (~~ and @#)");
6770+
die("Repeated format line will never terminate (~~ and @#)");
67716771

67726772
return mg;
67736773
}

Diff for: pp_hot.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -2748,7 +2748,7 @@ S_aassign_uid(pTHX)
27482748
# endif /* HAS_SETEUID */
27492749
if (PL_delaymagic & DM_UID) {
27502750
if (PL_delaymagic_uid != PL_delaymagic_euid)
2751-
Perl_die(aTHX_ "No setreuid available");
2751+
die("No setreuid available");
27522752
PERL_UNUSED_RESULT(PerlProc_setuid(PL_delaymagic_uid));
27532753
}
27542754
#endif /* HAS_SETRESUID */
@@ -2783,7 +2783,7 @@ S_aassign_uid(pTHX)
27832783
# endif /* HAS_SETEGID */
27842784
if (PL_delaymagic & DM_GID) {
27852785
if (PL_delaymagic_gid != PL_delaymagic_egid)
2786-
Perl_die(aTHX_ "No setregid available");
2786+
die("No setregid available");
27872787
PERL_UNUSED_RESULT(PerlProc_setgid(PL_delaymagic_gid));
27882788
}
27892789
#endif /* HAS_SETRESGID */
@@ -4427,13 +4427,13 @@ S_softref2xv_lite(pTHX_ SV *const sv, const char *const what,
44274427
{
44284428
if (PL_op->op_private & HINT_STRICT_REFS) {
44294429
if (SvOK(sv))
4430-
Perl_die(aTHX_ PL_no_symref_sv, sv,
4430+
die(PL_no_symref_sv, sv,
44314431
(SvPOKp(sv) && SvCUR(sv)>32 ? "..." : ""), what);
44324432
else
4433-
Perl_die(aTHX_ PL_no_usym, what);
4433+
die(PL_no_usym, what);
44344434
}
44354435
if (!SvOK(sv))
4436-
Perl_die(aTHX_ PL_no_usym, what);
4436+
die(PL_no_usym, what);
44374437
return gv_fetchsv_nomg(sv, GV_ADD, type);
44384438
}
44394439

Diff for: sv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13508,7 +13508,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
1350813508
int i = PERL_INT_MIN;
1350913509
(void)Perl_frexp((NV)fv, &i);
1351013510
if (i == PERL_INT_MIN)
13511-
Perl_die(aTHX_ "panic: frexp: %" VCATPVFN_FV_GF, fv);
13511+
die("panic: frexp: %" VCATPVFN_FV_GF, fv);
1351213512

1351313513
if (i > 0) {
1351413514
digits = BIT_DIGITS(i);

Diff for: toke.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4961,7 +4961,7 @@ Perl_filter_del(pTHX_ filter_t funcp)
49614961
return;
49624962
}
49634963
/* we need to search for the correct entry and clear it */
4964-
Perl_die(aTHX_ "filter_del can only delete in reverse order (currently)");
4964+
die("filter_del can only delete in reverse order (currently)");
49654965
}
49664966

49674967

0 commit comments

Comments
 (0)