diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2015-01-04 23:37:58 -0500 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2015-01-05 06:30:33 -0800 |
commit | a84d3d5affc6dd8190612862b9d5e2b60e0c584f (patch) | |
tree | 6567c97ce63dfe57f5a0a512ad322b6a679b182a /ext/Devel-Peek | |
parent | bf7d93eacd037b880856f9dc7c6429382c391cef (diff) | |
download | perl-a84d3d5affc6dd8190612862b9d5e2b60e0c584f.tar.gz |
const the custom op struct in Devel::Peek
This makes the Devel::Peek shared library free of perl caused RW static
data vars, and if CC/OS platform allows, removes RW data section from the
shared library.
Diffstat (limited to 'ext/Devel-Peek')
-rw-r--r-- | ext/Devel-Peek/Peek.pm | 2 | ||||
-rw-r--r-- | ext/Devel-Peek/Peek.xs | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/ext/Devel-Peek/Peek.pm b/ext/Devel-Peek/Peek.pm index 8f429b43b9..f3adcfc1cd 100644 --- a/ext/Devel-Peek/Peek.pm +++ b/ext/Devel-Peek/Peek.pm @@ -3,7 +3,7 @@ package Devel::Peek; -$VERSION = '1.20'; +$VERSION = '1.21'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/Devel-Peek/Peek.xs b/ext/Devel-Peek/Peek.xs index 7e64edeee9..856ff773a1 100644 --- a/ext/Devel-Peek/Peek.xs +++ b/ext/Devel-Peek/Peek.xs @@ -406,7 +406,13 @@ S_ck_dump(pTHX_ OP *entersubop, GV *namegv, SV *cv) return (OP *)newop; } -static XOP my_xop; +const static XOP my_xop = { + XOPf_xop_name|XOPf_xop_desc|XOPf_xop_class, /* xop_flags */ + "Devel_Peek_Dump", /* xop_name */ + "Dump", /* xop_desc */ + OA_BINOP, /* xop_class */ + NULL /* xop_peep */ +}; MODULE = Devel::Peek PACKAGE = Devel::Peek @@ -439,10 +445,6 @@ BOOT: CV * const cv = get_cvn_flags("Devel::Peek::Dump", 17, 0); assert(cv); cv_set_call_checker(cv, S_ck_dump, (SV *)cv); - - XopENTRY_set(&my_xop, xop_name, "Devel_Peek_Dump"); - XopENTRY_set(&my_xop, xop_desc, "Dump"); - XopENTRY_set(&my_xop, xop_class, OA_BINOP); Perl_custom_op_register(aTHX_ S_pp_dump, &my_xop); } |