summaryrefslogtreecommitdiff
path: root/ext/XS-APItest/APItest.xs
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-03 18:12:02 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-03 20:16:53 -0800
commit1d5686ec7b423f88ee27ac6dfd9a6de27e442e2e (patch)
treed3cba6d4b2a989450f15dd01a7865fe85101c5aa /ext/XS-APItest/APItest.xs
parent7191ba826010be5f9fb9fcf3b1127d150479a588 (diff)
downloadperl-1d5686ec7b423f88ee27ac6dfd9a6de27e442e2e.tar.gz
[perl #123103] Allow ext magic on read-onlies
Perl cannot know whether the magic will modify the SV, so it should give the benefit of the doubt.
Diffstat (limited to 'ext/XS-APItest/APItest.xs')
-rw-r--r--ext/XS-APItest/APItest.xs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index c5ae2becf1..8d3d23a90b 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -3779,6 +3779,11 @@ ALIAS:
CODE:
sv_unmagicext(SvRV(sv), PERL_MAGIC_ext, ix ? &vtbl_bar : &vtbl_foo);
+void
+sv_magic(SV *sv, SV *thingy)
+CODE:
+ sv_magic(SvRV(sv), NULL, PERL_MAGIC_ext, (const char *)thingy, 0);
+
UV
test_get_vtbl()
PREINIT: