Skip to content

Commit

Permalink
handy.h: make IV_MIN convenience macros public
Browse files Browse the repository at this point in the history
This allows NEGATE_2UV, NEGATE_2IV, and ABS_IV_MIN to be used
outside of core.
  • Loading branch information
richardleach committed Feb 10, 2025
1 parent afdc264 commit 547eb53
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions handy.h
Original file line number Diff line number Diff line change
Expand Up @@ -3103,7 +3103,6 @@ STMT_START { \
(x) ^= ((x) << 26); \
} STMT_END

#ifdef PERL_CORE
/* Convenience macros for dealing with IV_MIN:
In two's complement system, the absolute value of IV_MIN (i.e. -IV_MIN)
cannot be represented in an IV. Thus we cannot use simple negation
Expand Down Expand Up @@ -3160,8 +3159,6 @@ undefined behavior when C<uv> is equal to C<L</ABS_IV_MIN>>.
# define NEGATE_2IV(uv) (ASSUME((uv) <= ABS_IV_MIN), \
(uv) < 8U ? -(IV)(uv) : -(IV)((uv) - 8U) - 8)

#endif /* PERL_CORE */

#endif /* PERL_HANDY_H_ */

/*
Expand Down

0 comments on commit 547eb53

Please sign in to comment.