diff options
author | Lev Walkin <vlm@lionet.info> | 2005-01-17 11:40:49 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-01-17 11:40:49 +0000 |
commit | 659c63b7462412623650bab37349b1ad98dbebca (patch) | |
tree | b86b0d204ec312476cc7da522ef235a29f5d98cd /libasn1compiler | |
parent | 028a28bf5fbf247292b9590e496ff44161eaa2fa (diff) |
extensions in CHOICE types properly marked
Diffstat (limited to 'libasn1compiler')
-rw-r--r-- | libasn1compiler/asn1c_C.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c index 2cbe258c..5a4d1d8a 100644 --- a/libasn1compiler/asn1c_C.c +++ b/libasn1compiler/asn1c_C.c @@ -655,22 +655,18 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) { * Print out the table according to which the parsing is performed. */ if(expr_elements_count(arg, expr)) { - int comp_mode = 0; /* {root,ext=1,root,root,...} */ p = MKID(expr->Identifier); OUT("static asn_TYPE_member_t asn_MBR_%s[] = {\n", p); elements = 0; INDENTED(TQ_FOR(v, &(expr->members), next) { - if(v->expr_type == A1TC_EXTENSIBLE) { - if(comp_mode < 3) comp_mode++; - } else { - if(comp_mode == 1 - || expr_better_indirect(arg, v)) - v->marker.flags |= EM_INDIRECT; - elements++; - emit_member_table(arg, v); - } + if(v->expr_type == A1TC_EXTENSIBLE) + continue; + if(expr_better_indirect(arg, v)) + v->marker.flags |= EM_INDIRECT; + elements++; + emit_member_table(arg, v); }); OUT("};\n"); } else { |