summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-08 22:15:52 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-08 22:15:52 -0700
commitd673215e89e48f1d926b059d6b44b3b8a681d538 (patch)
tree74caec402dfc9849baa99c00f8f7db4381f74b56 /op.c
parentea31ed6697f4ec8ba9adbd2e965d8912bb223307 (diff)
downloadperl-d673215e89e48f1d926b059d6b44b3b8a681d538.tar.gz
Make prototype("CORE::CORE") die once more.
Commit b8c38f0a2a65 accidentally made prototype("CORE::CORE") return undef instead of dying. This is the only case that reached the line with the ‘Should not happen...’ comment. This commit changes it to be handled earlier and also adds an asser- tion to make sure that unreachable code really is unreachable (which it should be now, I think, I hope...).
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/op.c b/op.c
index d20009e265..a1443850f3 100644
--- a/op.c
+++ b/op.c
@@ -10245,7 +10245,7 @@ Perl_core_prototype(pTHX_ SV *sv, const char *name, const STRLEN len,
PERL_ARGS_ASSERT_CORE_PROTOTYPE;
- if (!code) {
+ if (!code || code == -KEY_CORE) {
if (croak)
return (SV *)Perl_die(aTHX_
"Can't find an opnumber for \"%s\"", name
@@ -10290,7 +10290,7 @@ Perl_core_prototype(pTHX_ SV *sv, const char *name, const STRLEN len,
}
i++;
}
- return NULL; /* Should not happen... */
+ assert(0); return NULL; /* Should not happen... */
found:
defgv = PL_opargs[i] & OA_DEFGV;
oa = PL_opargs[i] >> OASHIFT;