Commit 46fc2bd8 authored by Lev Walkin's avatar Lev Walkin

support for C++

parent b2ee6591
...@@ -6,16 +6,26 @@ ...@@ -6,16 +6,26 @@
#define ASN_SET_OF_H #define ASN_SET_OF_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { #define A_SET_OF(type) \
struct { \
type **array; \
int count; /* Meaningful size */ \
int size; /* Allocated size */ \
void (*free)(decltype(*array)); \
}
#else /* C */
#define A_SET_OF(type) \
struct { \
type **array; \
int count; /* Meaningful size */ \
int size; /* Allocated size */ \
void (*free)(type *); \
}
#endif #endif
#define A_SET_OF(type) \ #ifdef __cplusplus
struct { \ extern "C" {
type **array; \ #endif
int count; /* Meaningful size */ \
int size; /* Allocated size */ \
void (*free)(type *); \
}
#define ASN_SET_ADD(headptr, ptr) \ #define ASN_SET_ADD(headptr, ptr) \
asn_set_add((headptr), (ptr)) asn_set_add((headptr), (ptr))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment