summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
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;