summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2014-10-02 15:54:58 +1000
committerTony Cook <tony@develop-help.com>2014-10-09 11:24:50 +1100
commita6d695237c4c14fa287df157c4907e01d4647641 (patch)
tree77c7361b0f9c6d75fc7b703d4cc190cb16b906d3 /proto.h
parent2c2d7daa95190ae95ae6486d1734a1167ea05966 (diff)
downloadperl-a6d695237c4c14fa287df157c4907e01d4647641.tar.gz
[perl #122445] use magic on $DB::single etc to avoid overload issues
This prevents perl recursing infinitely when an overloaded object is assigned to $DB::single, $DB::trace or $DB::signal This is done by referencing their values as IVs instead of as SVs in dbstate, and by adding magic to those variables so that assignments to the scalars update the PL_DBcontrol array.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 0a90a04921..51eb005f38 100644
--- a/proto.h
+++ b/proto.h
@@ -2350,6 +2350,12 @@ PERL_CALLCONV int Perl_magic_getarylen(pTHX_ SV* sv, const MAGIC* mg)
#define PERL_ARGS_ASSERT_MAGIC_GETARYLEN \
assert(sv); assert(mg)
+PERL_CALLCONV int Perl_magic_getdebugvar(pTHX_ SV* sv, MAGIC* mg)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MAGIC_GETDEBUGVAR \
+ assert(sv); assert(mg)
+
PERL_CALLCONV int Perl_magic_getdefelem(pTHX_ SV* sv, MAGIC* mg)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
@@ -2466,6 +2472,12 @@ PERL_CALLCONV int Perl_magic_setdbline(pTHX_ SV* sv, MAGIC* mg)
#define PERL_ARGS_ASSERT_MAGIC_SETDBLINE \
assert(sv); assert(mg)
+PERL_CALLCONV int Perl_magic_setdebugvar(pTHX_ SV* sv, MAGIC* mg)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MAGIC_SETDEBUGVAR \
+ assert(sv); assert(mg)
+
PERL_CALLCONV int Perl_magic_setdefelem(pTHX_ SV* sv, MAGIC* mg)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);