mirror of https://gerrit.osmocom.org/asn1c
added explicit (deprecated) ANY flag
This commit is contained in:
parent
026055ff81
commit
14fd3e5a89
|
@ -2957,9 +2957,10 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr, asn1c_ioc_table_and_objset_t *
|
|||
|
||||
OUT("{ ");
|
||||
|
||||
if((outmost_tag && outmost_tag->tag_value == -1)
|
||||
|| is_open_type(arg, expr, opt_ioc)) {
|
||||
if(is_open_type(arg, expr, opt_ioc)) {
|
||||
OUT("ATF_OPEN_TYPE | ");
|
||||
} else if(outmost_tag && outmost_tag->tag_value == -1) {
|
||||
OUT("ATF_ANY_TYPE | ");
|
||||
}
|
||||
OUT("%s, ",
|
||||
(expr->marker.flags & EM_INDIRECT)?"ATF_POINTER":"ATF_NOFLAGS");
|
||||
|
|
|
@ -293,7 +293,7 @@ SEQUENCE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
edx = n;
|
||||
ctx->step = 1 + 2 * edx; /* Remember! */
|
||||
goto microphase2;
|
||||
} else if(elements[n].flags & ATF_OPEN_TYPE) {
|
||||
} else if(elements[n].flags & ATF_ANY_TYPE) {
|
||||
/*
|
||||
* This is the ANY type, which may bear
|
||||
* any flag whatsoever.
|
||||
|
|
|
@ -187,7 +187,7 @@ SEQUENCE_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
*/
|
||||
ctx->step |= 1; /* Confirm entering next microphase */
|
||||
microphase2_decode_continues:
|
||||
if((elm->flags & ATF_OPEN_TYPE) && elm->type_selector) {
|
||||
if(elm->flags & ATF_OPEN_TYPE) {
|
||||
rval = OPEN_TYPE_oer_get(opt_codec_ctx, td, st, elm, ptr, size);
|
||||
} else {
|
||||
void *memb_tmpptr; /* Temporary reference. */
|
||||
|
|
|
@ -204,9 +204,10 @@ typedef struct asn_TYPE_descriptor_s {
|
|||
* i.e. SEQUENCE, SET, CHOICE, etc.
|
||||
*/
|
||||
enum asn_TYPE_flags_e {
|
||||
ATF_NOFLAGS,
|
||||
ATF_POINTER = 0x01, /* Represented by the pointer */
|
||||
ATF_OPEN_TYPE = 0x02 /* ANY type, without meaningful tag */
|
||||
ATF_NOFLAGS,
|
||||
ATF_POINTER = 0x01, /* Represented by the pointer */
|
||||
ATF_OPEN_TYPE = 0x02, /* Open Type */
|
||||
ATF_ANY_TYPE = 0x04 /* ANY type (deprecated!) */
|
||||
};
|
||||
typedef struct asn_TYPE_member_s {
|
||||
enum asn_TYPE_flags_e flags; /* Element's presentation flags */
|
||||
|
|
|
@ -33,7 +33,7 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
|
|||
.default_value = 0,
|
||||
.name = "i"
|
||||
},
|
||||
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
|
||||
{ ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
|
||||
.tag = -1 /* Ambiguous tag (ANY?) */,
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_ANY,
|
||||
|
@ -182,7 +182,7 @@ extern asn_TYPE_descriptor_t asn_DEF_T3;
|
|||
/*** <<< STAT-DEFS [T3] >>> ***/
|
||||
|
||||
static asn_TYPE_member_t asn_MBR_T3_1[] = {
|
||||
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any1),
|
||||
{ ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any1),
|
||||
.tag = -1 /* Ambiguous tag (ANY?) */,
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_ANY,
|
||||
|
@ -193,7 +193,7 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
|
|||
.default_value = 0,
|
||||
.name = "any1"
|
||||
},
|
||||
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any2),
|
||||
{ ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any2),
|
||||
.tag = -1 /* Ambiguous tag (ANY?) */,
|
||||
.tag_mode = 0,
|
||||
.type = &asn_DEF_ANY,
|
||||
|
|
Loading…
Reference in New Issue