Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH 2/3] refactor: use bitsizeof() instead of 8 * sizeof()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:05

Jeff King [off-list ref] writes:
On Wed, Jul 22, 2009 at 11:34:34PM +0200, Pierre Habouzit wrote:
quoted
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+#define bitsizeof(x)  (CHAR_BIT * sizeof(x))
Isn't our style to use all-caps for macros? I.e., BITSIZEOF?
Perhaps but I'd say similarity between sizeof() and bitsizeof() calls for
consistency in the lowercase in this particular case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help