diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-08 22:15:52 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-08 22:15:52 -0700 |
commit | d673215e89e48f1d926b059d6b44b3b8a681d538 (patch) | |
tree | 74caec402dfc9849baa99c00f8f7db4381f74b56 /op.c | |
parent | ea31ed6697f4ec8ba9adbd2e965d8912bb223307 (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |