diff --git a/skeletons/asn_SEQUENCE_OF.h b/skeletons/asn_SEQUENCE_OF.h index e9967340..1109f238 100644 --- a/skeletons/asn_SEQUENCE_OF.h +++ b/skeletons/asn_SEQUENCE_OF.h @@ -33,4 +33,12 @@ */ void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); +/* + * Cope with different conversions requirements to/from void in C and C++. + * This is mostly useful for support library. + */ +typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; +#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) +#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) + #endif /* ASN_SEQUENCE_OF_H */ diff --git a/skeletons/asn_SET_OF.h b/skeletons/asn_SET_OF.h index 1443a7b8..774549fc 100644 --- a/skeletons/asn_SET_OF.h +++ b/skeletons/asn_SET_OF.h @@ -43,4 +43,12 @@ void asn_set_del(void *asn_set_of_x, int number, int _do_free); */ void asn_set_empty(void *asn_set_of_x); +/* + * Cope with different conversions requirements to/from void in C and C++. + * This is mostly useful for support library. + */ +typedef A_SET_OF(void) asn_anonymous_set_; +#define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) +#define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) + #endif /* ASN_SET_OF_H */ diff --git a/skeletons/asn_internal.h b/skeletons/asn_internal.h index 4c16dc9e..22011efa 100644 --- a/skeletons/asn_internal.h +++ b/skeletons/asn_internal.h @@ -80,16 +80,4 @@ static void ASN_DEBUG(const char *fmt, ...) { (void)fmt; }; if(cb(" ", 4, app_key) < 0) return -1; \ } while(0) -/* - * Cope with implicit conversions to/from void. - */ -#include -#include -typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; -typedef A_SET_OF(void) asn_anonymous_set_; -#define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) -#define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) -#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) -#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) - #endif /* _ASN_INTERNAL_H_ */