This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document INTMAX_C, UINTMAX_C
[perl5.git] / pp_pack.c
index 6479398..53d63f9 100644 (file)
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -212,8 +212,9 @@ S_mul128(pTHX_ SV *sv, U8 m)
 
 /* Explosives and implosives. */
 
-#define ISUUCHAR(ch)    (NATIVE_TO_LATIN1(ch) >= NATIVE_TO_LATIN1(' ')  \
-                      && NATIVE_TO_LATIN1(ch) <  NATIVE_TO_LATIN1('a'))
+#define ISUUCHAR(ch)    inRANGE(NATIVE_TO_LATIN1(ch),               \
+                                NATIVE_TO_LATIN1(' '),              \
+                                NATIVE_TO_LATIN1('a') - 1)
 
 /* type modifiers */
 #define TYPE_IS_SHRIEKING      0x100
@@ -1807,7 +1808,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
            }
            else {
                if (checksum < bits_in_uv) {
-                   UV mask = ((UV)1 << checksum) - 1;
+                   UV mask = nBIT_MASK(checksum);
                    cuv &= mask;
                }
                sv = newSVuv(cuv);