Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 1059f89

Browse files
committed
Filter-Util-Call-1.59
Improve tests using FindBin for filter-util.pl [atoomic #9] Add int casts, assert on 2GB limitation. No m4 filter in CORE
1 parent b2089ee commit 1059f89

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

Porting/Maintainers.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ package Maintainers;
756756
},
757757

758758
'Filter::Util::Call' => {
759-
'DISTRIBUTION' => 'RURBAN/Filter-1.58.tar.gz',
759+
'DISTRIBUTION' => 'RURBAN/Filter-1.59.tar.gz',
760760
'FILES' => q[cpan/Filter-Util-Call
761761
pod/perlfilter.pod
762762
],

cpan/Filter-Util-Call/Call.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use warnings;
1818

1919
our @ISA = qw(Exporter);
2020
our @EXPORT = qw( filter_add filter_del filter_read filter_read_exact) ;
21-
our $VERSION = "1.58" ;
21+
our $VERSION = "1.59" ;
2222
our $XS_VERSION = $VERSION;
2323
$VERSION = eval $VERSION;
2424

cpan/Filter-Util-Call/Call.xs

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Author : Paul Marquess
55
* Date : 2014-12-09 02:48:44 rurban
6-
* Version : 1.58
6+
* Version : 1.59
77
*
88
* Copyright (c) 1995-2011 Paul Marquess. All rights reserved.
99
* Copyright (c) 2011-2014 Reini Urban. All rights reserved.
@@ -66,7 +66,9 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen)
6666
while (1) {
6767

6868
/* anything left from last time */
69-
if ((n = SvCUR(my_sv))) {
69+
70+
if ((n = SvCUR(my_sv))) {
71+
assert(SvCUR(my_sv) < PERL_INT_MAX) ;
7072

7173
out_ptr = SvPVX(my_sv) + BUF_OFFSET(my_sv) ;
7274

@@ -146,7 +148,7 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen)
146148
croak("Filter::Util::Call - %s::filter returned %d values, 1 was expected \n",
147149
PERL_MODULE(my_sv), count ) ;
148150

149-
n = POPi ;
151+
n = (IV)POPi ;
150152

151153
if (fdebug)
152154
warn("status = %d, length op buf = %" IVdf " [%s]\n",
@@ -215,7 +217,7 @@ void
215217
real_import(object, perlmodule, coderef)
216218
SV * object
217219
char * perlmodule
218-
int coderef
220+
IV coderef
219221
PPCODE:
220222
{
221223
SV * sv = newSV(1) ;

cpan/Filter-Util-Call/t/call.t

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
use Config;
2+
23
BEGIN {
34
if ($ENV{PERL_CORE}) {
45
if ($Config{'extensions'} !~ m{\bFilter/Util/Call\b}) {
56
print "1..0 # Skip: Filter::Util::Call was not built\n";
67
exit 0;
78
}
89
}
9-
unshift @INC, 't';
10-
require 'filter-util.pl';
1110
}
1211

1312
use strict;
1413
use warnings;
1514

15+
use FindBin;
16+
use lib "$FindBin::Bin"; # required to load filter-util.pl
17+
18+
require 'filter-util.pl';
19+
1620
use vars qw($Inc $Perl);
1721

1822
print "1..34\n";

cpan/Filter-Util-Call/t/rt_54452-rebless.t

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ if ($] < 5.004_55) {
88

99
use strict;
1010
use warnings;
11-
BEGIN { unshift @INC, 't'; }
11+
12+
use FindBin;
13+
use lib "$FindBin::Bin"; # required to load filter-util.pl
1214

1315
require "filter-util.pl" ;
1416

dist/Module-CoreList/lib/Module/CoreList.pm

+1
Original file line numberDiff line numberDiff line change
@@ -17222,6 +17222,7 @@ for my $version ( sort { version_sort($a, $b) } keys %released ) {
1722217222
'ExtUtils::ParseXS::Eval' => '3.36_03',
1722317223
'ExtUtils::ParseXS::Utilities'=> '3.36_03',
1722417224
'File::Temp' => '0.2308',
17225+
'Filter::Util::Call' => '1.59',
1722517226
'Hash::Util' => '0.22_01',
1722617227
'I18N::LangTags' => '0.42_01',
1722717228
'IO' => '1.38_01',

pod/perlcdelta.pod

+5-1
Original file line numberDiff line numberDiff line change
@@ -1538,12 +1538,16 @@ In this case it should simply not filter anything.
15381538

15391539
- update distribution tooling
15401540

1541-
=item L<Filter::Util::Call> 1.58
1541+
=item L<Filter::Util::Call> 1.59
15421542

15431543
XSLoader, our. defer Carp.
15441544

15451545
Add filter_read_exact tests.
15461546

1547+
Improve tests using FindBin for filter-util.pl [atoomic #9]
1548+
1549+
Add int casts, assert on 2GB limitation.
1550+
15471551
=item L<GDBM_File> 1.17
15481552

15491553
Its documentation now explains that C<each> and C<delete> don't mix in

0 commit comments

Comments
 (0)