diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-03 12:07:51 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-03 12:07:51 +0000 |
commit | 7d255dc8b56bf0fe58c3f8a5aa84ba17aade145f (patch) | |
tree | 5f506b8de465d6446ac8d22ba1da9b37dc7a6aed /ext/XS-APItest/APItest.xs | |
parent | 028d3bfa8c8f6cc438e76398093d65f5f14b189c (diff) | |
download | perl-7d255dc8b56bf0fe58c3f8a5aa84ba17aade145f.tar.gz |
Add tests for tryAMAGICunDEREF_var().
Diffstat (limited to 'ext/XS-APItest/APItest.xs')
-rw-r--r-- | ext/XS-APItest/APItest.xs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 386fda9ab6..51e898a4d2 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -913,6 +913,20 @@ INCLUDE: const-xs.inc INCLUDE: numeric.xs +MODULE = XS::APItest:Overload PACKAGE = XS::APItest::Overload + +SV * +tryAMAGICunDEREF_var(sv, what) + SV *sv + int what + PPCODE: + { + SV **sp = &sv; + tryAMAGICunDEREF_var(what); + } + /* The reference is owned by something else. */ + PUSHs(sv); + MODULE = XS::APItest PACKAGE = XS::APItest::XSUB BOOT: |