]> git.stg.codes - stg.git/blobdiff - libs/smux/include/stg/asn_SET_OF.h
Regen SMUX support library with more recent ASN1 compiler.
[stg.git] / libs / smux / include / stg / asn_SET_OF.h
index 7edf14b51b984d545b818fcf3a93204935d46a80..882e1a47d4ad0b8cdfd359be63b8f577d158cd43 100644 (file)
@@ -1,21 +1,31 @@
 /*-
- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
 #ifndef        ASN_SET_OF_H
 #define        ASN_SET_OF_H
 
 #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
 
-#define        A_SET_OF(type)                                  \
-       struct {                                        \
-               type **array;                           \
-               int count;      /* Meaningful size */   \
-               int size;       /* Allocated size */    \
-               void (*free)(type *);                   \
-       }
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #define        ASN_SET_ADD(headptr, ptr)               \
        asn_set_add((headptr), (ptr))