Skip to content

Commit

Permalink
drop the 5
Browse files Browse the repository at this point in the history
This commit drop PERL_REVISION from $] and $^V.

Since $^V expects 3 components, we add a .0 at the end.
  • Loading branch information
book committed Dec 9, 2024
1 parent 106347d commit ea41b51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Porting/makerel
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ my @patchlevel_h = <PATCHLEVEL>;
close PATCHLEVEL;
my $patchlevel_h = join "", grep { /^#\s*define/ } @patchlevel_h;
print $patchlevel_h;
my $revision = $1 if $patchlevel_h =~ /PERL_REVISION\s+(\d+)/;
my $patchlevel = $1 if $patchlevel_h =~ /PERL_VERSION\s+(\d+)/;
my $subversion = $1 if $patchlevel_h =~ /PERL_SUBVERSION\s+(\d+)/;
die "Unable to parse patchlevel.h" unless $subversion >= 0;
my $vers = sprintf("%d.%d.%d", $revision, $patchlevel, $subversion);
my $vers = sprintf("%d.%d", $patchlevel, $subversion);

# fetch list of local patches
my (@local_patches, @lpatch_tags, $lpatch_tags);
Expand Down
8 changes: 3 additions & 5 deletions perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5351,12 +5351,10 @@ EXTERN_C char **environ; /* environment variables supplied via exec */
#include "patchlevel.h"
#undef PERL_PATCHLEVEL_H_IMPLICIT

#define PERL_VERSION_STRING STRINGIFY(PERL_REVISION) "." \
STRINGIFY(PERL_VERSION) "." \
STRINGIFY(PERL_SUBVERSION)
#define PERL_VERSION_STRING STRINGIFY(PERL_VERSION) "." \
STRINGIFY(PERL_SUBVERSION) ".0"

#define PERL_API_VERSION_STRING STRINGIFY(PERL_API_REVISION) "." \
STRINGIFY(PERL_API_VERSION) "." \
#define PERL_API_VERSION_STRING STRINGIFY(PERL_API_VERSION) "." \
STRINGIFY(PERL_API_SUBVERSION)

START_EXTERN_C
Expand Down

0 comments on commit ea41b51

Please sign in to comment.