aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-01-17 11:40:49 +0000
committerLev Walkin <vlm@lionet.info>2005-01-17 11:40:49 +0000
commit659c63b7462412623650bab37349b1ad98dbebca (patch)
treeb86b0d204ec312476cc7da522ef235a29f5d98cd /libasn1compiler
parent028a28bf5fbf247292b9590e496ff44161eaa2fa (diff)
extensions in CHOICE types properly marked
Diffstat (limited to 'libasn1compiler')
-rw-r--r--libasn1compiler/asn1c_C.c16
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 {