From: Daniel Ribeiro Date: Sun, 9 Jan 2011 05:48:39 +0000 (-0200) Subject: Add ARRAY_AND_SIZE macro X-Git-Tag: libsigrok-0.1.0~465 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=dfa4b731da66ddf05ff04943bf0d385aa440c3ac;p=libsigrok.git Add ARRAY_AND_SIZE macro Just a handy macro --- diff --git a/sigrok.h b/sigrok.h index a9183a39..16a41570 100644 --- a/sigrok.h +++ b/sigrok.h @@ -63,6 +63,10 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #endif +#ifndef ARRAY_AND_SIZE +#define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) +#endif + /* Data types, used by hardware plugins for set_configuration() */ enum { T_UINT64,