Move type operations to another structure
Every type has free, print, check_constraints, ber_decoder, der_encoder,
xer_decoder, xer_encoder, uper_decoder, uper_encoder and outmost_tag
operations. We move them out to a separate structure asn_TYPE_operation_t.
Combined with previous logic simplification, these operations are based
on ASN.1 basic types, constructed types and string types. So we can
reduce the space occupied by asn_TYPE_descriptor_t variables.
diff --git a/tests/tests-c-compiler/check-src/check-119.-gen-PER.c b/tests/tests-c-compiler/check-src/check-119.-gen-PER.c
index bb52eac..96ccc9f 100644
--- a/tests/tests-c-compiler/check-src/check-119.-gen-PER.c
+++ b/tests/tests-c-compiler/check-src/check-119.-gen-PER.c
@@ -129,7 +129,7 @@
" chunks %zd\n",
size, fname, how==AS_PER?"PER":"XER", csize);
- if(st) asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0);
+ if(st) ASN_STRUCT_FREE(asn_DEF_PDU, st);
st = 0;
do {
@@ -200,7 +200,7 @@
} else {
assert(rval.code != RC_OK);
fprintf(stderr, "Failed, but this was expected\n");
- asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0);
+ ASN_STRUCT_FREE(asn_DEF_PDU, st);
st = 0; /* ignore leak for now */
}
}
@@ -291,7 +291,7 @@
break;
}
- asn_DEF_PDU.free_struct(&asn_DEF_PDU, st, 0);
+ ASN_STRUCT_FREE(asn_DEF_PDU, st);
}
/*