diff options
author | Niko Tyni <ntyni@debian.org> | 2010-11-06 06:18:15 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-06 06:29:35 -0700 |
commit | 0b06a75363d6bf6cd309efd90b7182a041a1f4f1 (patch) | |
tree | 952044ec2b15985c4376077be4c24bd373af4218 /ext/XS-APItest/t | |
parent | 54f31609179a66b324c59d37ad085e593f4ab2d7 (diff) | |
download | perl-0b06a75363d6bf6cd309efd90b7182a041a1f4f1.tar.gz |
G_VOID, G_SCALAR, and G_ARRAY are not separate bits anymore
Commit 2f8edad0d37e91319b6ba10b3745327ea49c179 made G_ARRAY
equal to G_SCALAR | G_VOID, contrary to perlcall.pod.
Bring the documentation up to date and add a test to prevent a similar
(although unlikely) accident in the future.
Diffstat (limited to 'ext/XS-APItest/t')
-rw-r--r-- | ext/XS-APItest/t/call.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/XS-APItest/t/call.t b/ext/XS-APItest/t/call.t index caa86c4c1d..fd968b83d6 100644 --- a/ext/XS-APItest/t/call.t +++ b/ext/XS-APItest/t/call.t @@ -11,7 +11,7 @@ use strict; BEGIN { require '../../t/test.pl'; - plan(435); + plan(436); use_ok('XS::APItest') }; @@ -149,6 +149,15 @@ for my $test ( }; +{ + # these are the ones documented in perlcall.pod + my @flags = (G_DISCARD, G_NOARGS, G_EVAL, G_KEEPERR); + my $mask = 0; + $mask |= $_ for (@flags); + is(unpack('%32b*', pack('l', $mask)), @flags, + "G_DISCARD and the rest are separate bits"); +} + foreach my $inx ("", "aabbcc\n", [qw(aa bb cc)]) { foreach my $outx ("", "xxyyzz\n", [qw(xx yy zz)]) { my $warn; |