summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-06-08 17:58:39 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-06-08 20:19:50 -0700
commitc0b8aebd3285e94126140a78c9d5503be4f76b62 (patch)
tree455aa0b702c63796916b0b8e6ed1663d9deb289c /ext
parente2367aa89c2dff8e12ae9e50931f1e00e8a57124 (diff)
downloadperl-c0b8aebd3285e94126140a78c9d5503be4f76b62.tar.gz
Add alloccopstash provisionally to the API
Diffstat (limited to 'ext')
-rw-r--r--ext/XS-APItest/APItest.pm2
-rw-r--r--ext/XS-APItest/APItest.xs11
-rw-r--r--ext/XS-APItest/t/copstash.t9
3 files changed, 21 insertions, 1 deletions
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm
index d7fb60adea..0eff22eea1 100644
--- a/ext/XS-APItest/APItest.pm
+++ b/ext/XS-APItest/APItest.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Carp;
-our $VERSION = '0.39';
+our $VERSION = '0.40';
require XSLoader;
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 21a8c8c4ef..2c0ee61493 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -3348,6 +3348,17 @@ setup_addissub()
CODE:
wrap_op_checker(OP_ADD, addissub_myck_add, &addissub_nxck_add);
+#ifdef USE_ITHREADS
+
+bool
+test_alloccopstash()
+CODE:
+ RETVAL = PL_stashpad[alloccopstash(PL_defstash)] == PL_defstash;
+OUTPUT:
+ RETVAL
+
+#endif
+
MODULE = XS::APItest PACKAGE = XS::APItest::AUTOLOADtest
int
diff --git a/ext/XS-APItest/t/copstash.t b/ext/XS-APItest/t/copstash.t
new file mode 100644
index 0000000000..8ed98a231b
--- /dev/null
+++ b/ext/XS-APItest/t/copstash.t
@@ -0,0 +1,9 @@
+use Config;
+use Test::More;
+BEGIN { plan skip_all => 'no threads' unless $Config{useithreads} }
+
+plan tests => 1;
+
+use XS::APItest;
+
+ok test_alloccopstash;