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:
parent
54ac5277c5
commit
4cea9eb20d
|
@ -25,6 +25,7 @@
|
|||
#include <glib.h>
|
||||
#include <libusb.h>
|
||||
#include <sigrok.h>
|
||||
#include <sigrok-internal.h>
|
||||
#include "analyzer.h"
|
||||
|
||||
#define USB_VENDOR 0x0c12
|
||||
|
|
|
@ -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);
|
||||
|
|
8
sigrok.h
8
sigrok.h
|
@ -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() */
|
||||
|
|
Loading…
Reference in New Issue