X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=adt%2Futil.h;h=f6e71cea2112a3dad7bb0e65a2ac1c9d06ccf10a;hb=3cdead30b5c1d131d5c363188c26255514ea2fc8;hp=c2aef83aa4d875b68d1bf1a05c01f6fa890553a0;hpb=ffaec83406ffaee8b981b2b80114bc2e2eab5f0e;p=cparser diff --git a/adt/util.h b/adt/util.h index c2aef83..f6e71ce 100644 --- a/adt/util.h +++ b/adt/util.h @@ -50,4 +50,6 @@ */ #define UNLIKELY(x) __builtin_expect((x), 0) +#define lengthof(x) (sizeof(x) / sizeof(*(x))) + #endif