summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2020-03-29 21:40:01 +0100
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2020-03-29 21:42:43 +0100
commite5576b00988bc7efc88f19b62595311450378aa2 (patch)
tree60610466b7ea9a18a051748b2429d2a3575e5986 /pp.c
parentb11187bf165b7946337846701b6285b043e4aaa2 (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp.c b/pp.c
index 0da2e3e3e6..999275f429 100644
--- a/pp.c
+++ b/pp.c
@@ -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);