Skip to content

Commit d67f622

Browse files
committed
Fixup handy.h to use PERL_VERSION macro
handy.h was recently updated in 4a1bbd3 but this is not using the accurate definitions of the new semantic versions introduced as part of #18020 They are: - PERL_VERSION_MAJOR - PERL_VERSION_MINOR - PERL_VERSION_PATCH
1 parent 4a1bbd3 commit d67f622

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

handy.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -431,18 +431,18 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used.
431431

432432
/* internal helpers */
433433
/* Transitional */
434-
#ifndef PERL_MAJOR_VERSION
435-
# define PERL_MAJOR_VERSION PERL_REVISION
434+
#ifndef PERL_VERSION_MAJOR
435+
# define PERL_VERSION_MAJOR PERL_REVISION
436436
#else
437437
# undef PERL_REVISION /* We don't want code to be using these */
438438
#endif
439-
#ifndef PERL_MINOR_VERSION
440-
# define PERL_MINOR_VERSION PERL_VERSION
439+
#ifndef PERL_VERSION_MINOR
440+
# define PERL_VERSION_MINOR PERL_VERSION
441441
#else
442442
# undef PERL_VERSION
443443
#endif
444-
#ifndef PERL_MICRO_VERSION
445-
# define PERL_MICRO_VERSION PERL_SUBVERSION
444+
#ifndef PERL_VERSION_PATCH
445+
# define PERL_VERSION_PATCH PERL_SUBVERSION
446446
#else
447447
# undef PERL_SUBVERSION
448448
#endif
@@ -451,8 +451,8 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used.
451451
/* '10*' leaves room for things like alpha, beta, releases */ \
452452
(10 * ((maJor) * 1000000) + ((miNor) * 1000) + (Patch))
453453
#define PERL_DECIMAL_VERSION_ \
454-
PERL_JNP_TO_DECIMAL_(PERL_MAJOR_VERSION, PERL_MINOR_VERSION, \
455-
PERL_MICRO_VERSION)
454+
PERL_JNP_TO_DECIMAL_(PERL_VERSION_MAJOR, PERL_VERSION_MINOR, \
455+
PERL_VERSION_PATCH)
456456

457457
/*
458458
=for apidoc AmR|bool|PERL_VERSION_EQ|const U8 major|const U8 minor|const U8 patch
@@ -511,8 +511,8 @@ becomes
511511
* '*' is in ASCII and EBCDIC respectively */
512512
# define PERL_VERSION_EQ(j,n,p) \
513513
(((p) == '*') \
514-
? ( (j) == PERL_MAJOR_VERSION \
515-
&& (n) == PERL_MINOR_VERSION) \
514+
? ( (j) == PERL_VERSION_MAJOR \
515+
&& (n) == PERL_VERSION_MINOR) \
516516
: (PERL_DECIMAL_VERSION_ == PERL_JNP_TO_DECIMAL_(j,n,p)))
517517
# define PERL_VERSION_NE(j,n,p) (! PERL_VERSION_EQ(j,n,p))
518518

0 commit comments

Comments
 (0)