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

Commit 2de48ae

Browse files
committed
version-0.9923_02
add vpp support for cperl: scmp, c suffix. use vars => our.
1 parent 2499deb commit 2de48ae

File tree

8 files changed

+31
-12
lines changed

8 files changed

+31
-12
lines changed

Porting/Maintainers.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,8 @@ package Maintainers;
15721572
},
15731573

15741574
'version' => {
1575-
'DISTRIBUTION' => 'JPEACOCK/version-0.9918.tar.gz',
1575+
# https://github.com/rurban/version/commits/cperl
1576+
'DISTRIBUTION' => 'RURBAN/version-0.9923_02.tar.gz',
15761577
'FILES' => q[cpan/version vutil.c vutil.h vxs.inc],
15771578
'EXCLUDED' => [
15781579
qr{^vutil/lib/},

cpan/version/lib/version.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package version;
44
use 5.006002;
55
use strict;
66

7-
our $VERSION = '0.9923_02c';
8-
$VERSION =~ s/c$//;
7+
our $VERSION = '0.9923_02';
8+
#$VERSION =~ s/c$//;
99
our $CLASS = 'version';
1010
our (@ISA, $STRICT, $LAX);
1111

cpan/version/lib/version/regex.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package version::regex;
22

33
use strict;
44

5-
our $VERSION = '0.9923_02c';
6-
$VERSION =~ s/c$//;
5+
our $VERSION = '0.9923_02';
6+
#$VERSION =~ s/c$//;
77

88
#--------------------------------------------------------------------------#
99
# Version regexp components

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17346,6 +17346,8 @@ for my $version ( sort { version_sort($a, $b) } keys %released ) {
1734617346
'Time::Local' => '1.28',
1734717347
'Unicode::Collate' => '1.25_01',
1734817348
'Unicode::UCD' => '0.68_01',
17349+
'version' => '0.9923_02',
17350+
'version::regex' => '0.9923_02',
1734917351
'Win32' => '0.52_01',
1735017352
'XSLoader' => '1.04c',
1735117353
},

pod/perlcdelta.pod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2038,10 +2038,13 @@ Improved function documentation
20382038

20392039
=item L<vars> 1.04
20402040

2041-
=item L<version> 0.9918_02c
2041+
=item L<version> 0.9923_02
20422042

20432043
Add updates from 0.9918: Add LAX_DECIMAL_VERSION, LAX_DOTTED_DECIMAL_VERSION,
20442044
STRICT_DECIMAL_VERSION, STRICT_DOTTED_DECIMAL_VERSION regexes.
2045+
Add updates from 0.9921: pod, safer C locale switching.
2046+
add vpp support for cperl: scmp, c suffix.
2047+
use vars => our.
20452048

20462049
Add F<t/11_taint.t>
20472050

t/porting/customized.dat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ threads dist/threads/lib/threads.pm 070834529ce90f9cd47f9113e0803f4f44f47629
158158
threads dist/threads/t/locale.t 9a2a5b43a39867590eb288d4a1759abac2052aa8
159159
threads dist/threads/threads.xs 9d4c375efbcd56b57416c87406afec861bc01360
160160
threads::shared dist/threads-shared/t/waithires.t dc867159fd2fa8c09326cd7627f5a0635ca5e3b5
161-
version cpan/version/lib/version.pm 5c578896318efbc417130d977da356792954da03
162-
version cpan/version/lib/version/regex.pm ba583136e44d520d5a8636c85d27a007cd8d6f1e
161+
version cpan/version/lib/version.pm 1b451b1390960dd06445daf6796e503951fe2ab7
162+
version cpan/version/lib/version/regex.pm 43601bfc51311eff1b8e347ce62fab2bf2dd8809
163163
version vutil.c ea25ed9a0947909ea4d10a9a5f866f62c2299112
164-
version vxs.inc 4d5b01db64de0e6f54db11baa30aac9ecc0b2788
164+
version vxs.inc 3ac4b29b5093605e3bbf59c20814ef4a601484e4

vutil.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,17 @@ const char * Perl_prescan_version(pTHX_ const char *s, bool strict, const char**
262262
# define UNLOCK_LC_NUMERIC_STANDARD() UNLOCK_NUMERIC_STANDARD()
263263
#endif
264264

265+
/* from cperl */
266+
#ifndef strNEs
267+
# define strNEs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1))
268+
#endif
269+
#ifndef strEQc
270+
# define strEQc(s, c) memEQ(s, ("" c ""), sizeof(c))
271+
# define strNEc(s, c) memNE(s, ("" c ""), sizeof(c))
272+
#endif
273+
#ifndef hv_existss
274+
# define hv_existss(hv, key) \
275+
hv_exists((hv), ("" key ""), (sizeof(key)-1))
276+
#endif
277+
265278
/* ex: set ro: */

vxs.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ VXS(universal_version)
164164
}
165165

166166
if ( VCMP( req, sv ) > 0 ) {
167-
if ( hv_exists(MUTABLE_HV(SvRV(req)), "qv", 2 ) ) {
167+
if ( hv_existss(MUTABLE_HV(SvRV(req)), "qv") ) {
168168
req = VNORMAL(req);
169169
sv = VNORMAL(sv);
170170
}
@@ -366,7 +366,7 @@ VXS(version_scmp)
366366
SV *rvs;
367367
SV *robj = ST(1);
368368
const IV swap = SvIV(ST(2));
369-
const int lc = hv_exists(MUTABLE_HV(SvRV(ST(0))), "cperl", 5);
369+
const int lc = hv_existss(MUTABLE_HV(SvRV(ST(0))), "cperl");
370370
int ri;
371371
int rc;
372372

@@ -375,7 +375,7 @@ VXS(version_scmp)
375375
robj = sv_2mortal(NEW_VERSION(SvOK(robj) ? robj
376376
: newSVpvs_flags("0", SVs_TEMP)));
377377
}
378-
rc = (SvTYPE(robj) >= SVt_PVHV) && hv_exists(MUTABLE_HV(robj), "cperl", 5);
378+
rc = (SvTYPE(robj) >= SVt_PVHV) && hv_existss(MUTABLE_HV(robj), "cperl");
379379
rvs = SvRV(robj);
380380

381381
ri = swap ? VCMP(rvs,lobj) : VCMP(lobj,rvs);

0 commit comments

Comments
 (0)