Make ARRAY_SIZE/ARRAY_AND_SIZE private.

This is not libsigrok-specific and should not be part of our API.
This commit is contained in:
Uwe Hermann 2011-02-20 18:29:05 +01:00
parent 54ac5277c5
commit 4cea9eb20d
3 changed files with 11 additions and 8 deletions

View File

@ -25,6 +25,7 @@
#include <glib.h>
#include <libusb.h>
#include <sigrok.h>
#include <sigrok-internal.h>
#include "analyzer.h"
#define USB_VENDOR 0x0c12

View File

@ -20,6 +20,16 @@
#ifndef SIGROK_SIGROK_INTERNAL_H
#define SIGROK_SIGROK_INTERNAL_H
/*--- Macros ----------------------------------------------------------------*/
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif
#ifndef ARRAY_AND_SIZE
#define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
#endif
/*--- hwplugin.c ------------------------------------------------------------*/
int load_hwplugins(void);

View File

@ -66,14 +66,6 @@ extern "C" {
#define HZ_TO_NS(n) (1000000000 / (n))
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif
#ifndef ARRAY_AND_SIZE
#define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
#endif
typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data);
/* Data types used by hardware plugins for set_configuration() */