diff options
author | Robin Barker <robin@Spade-Ubuntu.(none)> | 2010-04-19 17:00:59 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-04-26 11:41:01 +0200 |
commit | 01146bad274273e459645fb4cce5aeac95999d64 (patch) | |
tree | b877fdc0b034bab52962d5c47ea9aa8c151e87d4 /ext | |
parent | e52cd83cc0ba95181604b2343509a8f91e21eed1 (diff) | |
download | perl-01146bad274273e459645fb4cce5aeac95999d64.tar.gz |
remove Perl_pmflag
Diffstat (limited to 'ext')
-rw-r--r-- | ext/XS-APItest/APItest.pm | 2 | ||||
-rw-r--r-- | ext/XS-APItest/APItest.xs | 10 | ||||
-rw-r--r-- | ext/XS-APItest/t/pmflag.t | 40 |
3 files changed, 4 insertions, 48 deletions
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm index acb885e22b..8612cfffba 100644 --- a/ext/XS-APItest/APItest.pm +++ b/ext/XS-APItest/APItest.pm @@ -23,7 +23,7 @@ our @EXPORT = qw( print_double print_int print_long my_cxt_getint my_cxt_getsv my_cxt_setint my_cxt_setsv sv_setsv_cow_hashkey_core sv_setsv_cow_hashkey_notcore rmagical_cast rmagical_flags - DPeek utf16_to_utf8 utf16_to_utf8_reversed pmflag my_exit + DPeek utf16_to_utf8 utf16_to_utf8_reversed my_exit sv_count ); diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 328ddea42f..ee57c8311f 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -922,16 +922,6 @@ utf16_to_utf8 (sv, ...) ST(0) = dest; XSRETURN(1); -U32 -pmflag (flag, before = 0) - int flag - U32 before - CODE: - pmflag(&before, flag); - RETVAL = before; - OUTPUT: - RETVAL - void my_exit(int exitcode) PPCODE: diff --git a/ext/XS-APItest/t/pmflag.t b/ext/XS-APItest/t/pmflag.t index 269b6bc64b..65011d2031 100644 --- a/ext/XS-APItest/t/pmflag.t +++ b/ext/XS-APItest/t/pmflag.t @@ -1,41 +1,7 @@ #!perl use strict; -use Test::More 'no_plan'; +use Test::More 'tests' => 2; -my @warnings; -$SIG{__WARN__} = sub { - push @warnings, "@_"; -}; +ok(!eval q{use XS::APItest 'pmflag'; 1}, "Perl_pmflag\(\) removed"); +like($@, qr{\Wpmflag\W\s+is\s+not\s+exported\b}, "pmflag not exported"); -use XS::APItest 'pmflag'; - -foreach (["\0", 0], - ['Q', 0], - ['c', 0x00004000], - ) { - my ($char, $val) = @$_; - my $ord = ord $char; - foreach my $before (0, 1) { - my $got = pmflag($ord, $before); - is($got, $before | $val, "Flag $ord, before $before"); - is(@warnings, 1); - like($warnings[0], - qr/^Perl_pmflag\(\) is deprecated, and will be removed from the XS API/); - @warnings = (); - - no warnings 'deprecated'; - - $got = pmflag($ord, $before); - is($got, $before | $val, "Flag $ord, before $before"); - is(@warnings, 0); - @warnings = (); - - use warnings; - $got = pmflag($ord, $before); - is($got, $before | $val, "Flag $ord, before $before"); - is(@warnings, 1); - like($warnings[0], - qr/^Perl_pmflag\(\) is deprecated, and will be removed from the XS API/); - @warnings = (); - } -} |