Skip to content

Commit

Permalink
Fix definitions of LIKELY and UNLIKELY on older perls
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Apr 26, 2024
1 parent 23e1de3 commit 69eae3a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vutil/vutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ static const char * Perl_prescan_version2(pTHX_ const char *s, bool strict, cons
# define is_STRICT_VERSION(a,b) \
(a != Perl_prescan_version2(aTHX_ a, TRUE, b, NULL, NULL, NULL, NULL))

#if PERL_VERSION_LT(5, 19, 1)
#undef LIKELY
#define LIKELY(cond) EXPECT(cBOOL(cond),TRUE)
#undef UNLIKELY
#define UNLIKELY(cond) EXPECT(cBOOL(cond),FALSE)
#endif

#else

const char * Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv);
Expand Down

0 comments on commit 69eae3a

Please sign in to comment.