This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handy.h: Create nBIT_UMAX() macro
[perl5.git] / handy.h
diff --git a/handy.h b/handy.h
index 7f07417..02ece2b 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -276,6 +276,9 @@ typedef U64TYPE U64;
 #  define nBIT_MASK(n) ((1UL << (n)) - 1)
 #endif
 
+/* The largest unsigned number that will fit into n bits */
+#define nBIT_UMAX(n)  nBIT_MASK(n)
+
 /*
 =for apidoc Am|void|__ASSERT_|bool expr