diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-03-29 21:40:01 +0100 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-03-29 21:42:43 +0100 |
commit | e5576b00988bc7efc88f19b62595311450378aa2 (patch) | |
tree | 60610466b7ea9a18a051748b2429d2a3575e5986 /pp.c | |
parent | b11187bf165b7946337846701b6285b043e4aaa2 (diff) | |
download | perl-e5576b00988bc7efc88f19b62595311450378aa2.tar.gz |
Perl_unipmlemented_op: Fix comment and unnecessary PL_op deref
The comment referred to pp_addr, but the correct field is op_ppaddr,
and the function itself is called Perl_unimplemented_op, not
PL_unimplemented_op.
When indexing PL_op_name[], use the local op_type variable that we
just got from PL_op->op_type instead of going via PL_op again.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6432,11 +6432,11 @@ PP(unimplemented_op) Secondly, as the three ops we "panic" on are padmy, mapstart and custom, if we get here for a custom op then that means that the custom op didn't have an implementation. Given that OP_NAME() looks up the custom op - by its pp_addr, likely it will return NULL, unless someone (unhelpfully) - registers &PL_unimplemented_op as the address of their custom op. + by its op_ppaddr, likely it will return NULL, unless someone (unhelpfully) + registers &Perl_unimplemented_op as the address of their custom op. NULL doesn't generate a useful error message. "custom" does. */ const char *const name = op_type >= OP_max - ? "[out of range]" : PL_op_name[PL_op->op_type]; + ? "[out of range]" : PL_op_name[op_type]; if(OP_IS_SOCKET(op_type)) DIE(aTHX_ PL_no_sock_func, name); DIE(aTHX_ "panic: unimplemented op %s (#%d) called", name, op_type); |