diff options
author | Lev Walkin <vlm@lionet.info> | 2005-07-02 20:22:20 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-07-02 20:22:20 +0000 |
commit | 089b8e9aa3a41e1cea0ba44918a55b6c60d3dd65 (patch) | |
tree | 10e22d8f03e8b34ed37fdf1f1d91ee8d0d589987 /skeletons | |
parent | a127c3a28781367a833979ab7a69301444db550f (diff) |
conversions
Diffstat (limited to 'skeletons')
-rw-r--r-- | skeletons/asn_SEQUENCE_OF.h | 8 | ||||
-rw-r--r-- | skeletons/asn_SET_OF.h | 8 | ||||
-rw-r--r-- | skeletons/asn_internal.h | 12 |
3 files changed, 16 insertions, 12 deletions
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 <asn_SET_OF.h> -#include <asn_SEQUENCE_OF.h> -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_ */ |