summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-12-25 06:16:31 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-12-25 17:47:23 -0800
commit88df5f01a6650d6895e7d3f03d1b340ca2506b05 (patch)
tree76bdc34ecd9d1801c9458a2e9e5850f2b8842959 /mg.c
parentb27804d8b48d647c08dc853b49e5b311fe166616 (diff)
downloadperl-88df5f01a6650d6895e7d3f03d1b340ca2506b05.tar.gz
Revert "[perl #119801] Stop @DB::dbline modifications from crashing"
This reverts commit c1cec775e9019cc8ae244d4db239a7ea5c0b343e. See ticket #120864.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/mg.c b/mg.c
index b98a1946df..8c57e2a532 100644
--- a/mg.c
+++ b/mg.c
@@ -2002,14 +2002,19 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg)
sv_2iv(MUTABLE_SV((mg)->mg_ptr)), FALSE);
if (svp && SvIOKp(*svp)) {
- size_t off = SvUVX(*svp);
- size_t sz = off+8/8;
- if (sz <= PL_breakpointslen) {
- /* set or clear breakpoint */
+ OP * const o = INT2PTR(OP*,SvIVX(*svp));
+ if (o) {
+#ifdef PERL_DEBUG_READONLY_OPS
+ Slab_to_rw(OpSLAB(o));
+#endif
+ /* set or clear breakpoint in the relevant control op */
if (SvTRUE(sv))
- PL_breakpoints[off/8] |= 1 << off%8;
+ o->op_flags |= OPf_SPECIAL;
else
- PL_breakpoints[off/8] &= ~(U8)(1 << off%8);
+ o->op_flags &= ~OPf_SPECIAL;
+#ifdef PERL_DEBUG_READONLY_OPS
+ Slab_to_ro(OpSLAB(o));
+#endif
}
}
return 0;