mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Create global macro NELEMS to replace countof macro defined just in main.c.
svn path=/trunk/yasm/; revision=592
This commit is contained in:
parent
58abdf1cd1
commit
b9541920f1
5 changed files with 19 additions and 14 deletions
5
util.h
5
util.h
|
|
@ -147,6 +147,11 @@ void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p);
|
|||
d += d>>8; \
|
||||
} while (0)
|
||||
|
||||
/* Get the number of elements in an array. */
|
||||
#ifndef NELEMS
|
||||
#define NELEMS(array) (sizeof(array) / sizeof(array[0]))
|
||||
#endif
|
||||
|
||||
#include "coretype.h"
|
||||
|
||||
#include "valparam.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue