Skip to content

Commit

Permalink
Added macro to get length of C-style arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Nov 9, 2024
1 parent ff3e2fb commit 85836cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions carbon.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
#else
#define CARBON_API extern
#endif
#define CARBON_ARRAY_LEN(x) (sizeof((x)) / sizeof((x)[0]))

/*
** $$===================$$
Expand Down

0 comments on commit 85836cf

Please sign in to comment.