Commit 089b8e9a authored by Lev Walkin's avatar Lev Walkin

conversions

parent a127c3a2
...@@ -33,4 +33,12 @@ ...@@ -33,4 +33,12 @@
*/ */
void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); 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 */ #endif /* ASN_SEQUENCE_OF_H */
...@@ -43,4 +43,12 @@ void asn_set_del(void *asn_set_of_x, int number, int _do_free); ...@@ -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); 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 */ #endif /* ASN_SET_OF_H */
...@@ -80,16 +80,4 @@ static void ASN_DEBUG(const char *fmt, ...) { (void)fmt; }; ...@@ -80,16 +80,4 @@ static void ASN_DEBUG(const char *fmt, ...) { (void)fmt; };
if(cb(" ", 4, app_key) < 0) return -1; \ if(cb(" ", 4, app_key) < 0) return -1; \
} while(0) } 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_ */ #endif /* _ASN_INTERNAL_H_ */
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