Skip to content

Commit

Permalink
ARRAY_SIZE支持mac
Browse files Browse the repository at this point in the history
  • Loading branch information
losehu committed Nov 20, 2024
1 parent b7564c2 commit f126c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <stdint.h>

#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif

#ifndef MAX
Expand Down

0 comments on commit f126c45

Please sign in to comment.