mirror of https://gerrit.osmocom.org/asn1c
removed order dependency in DEFAULT references
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@577 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
8e1d2fc0f6
commit
7972927fbc
|
@ -1,5 +1,5 @@
|
|||
|
||||
0.9.8: 2004-Oct-26
|
||||
0.9.8: 2004-Oct-30
|
||||
|
||||
* [NEW PLATFORM] Compiled and tested on Linux @ alpha64 (LP64).
|
||||
Some code needed to be fixed regarding int-long conversions
|
||||
|
@ -13,6 +13,8 @@
|
|||
* Empty SEQUENCE and SET clauses are now allowed.
|
||||
* Removed confusion between &xNN; and &#xNN; in enber and unber.
|
||||
* ber_dec_rval_t renamed into asn_dec_rval_t: more generality.
|
||||
* Removed order dependency in DEFAULT references to ENUMERATED
|
||||
identifiers (./tests/68-*-OK.asn1).
|
||||
|
||||
0.9.7.1: 2004-Oct-12
|
||||
|
||||
|
|
|
@ -261,6 +261,12 @@ asn1f_fix_module__phase_2(arg_t *arg) {
|
|||
/* Do not process the parametrized types here */
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Dereference DEFAULT values.
|
||||
*/
|
||||
ret = asn1f_recurse_expr(arg, asn1f_fix_dereference_defaults);
|
||||
RET2RVAL(ret, rvalue);
|
||||
|
||||
/*
|
||||
* Check semantic validity of constraints.
|
||||
*/
|
||||
|
|
|
@ -15,6 +15,18 @@ asn1f_fix_dereference_values(arg_t *arg) {
|
|||
}
|
||||
}
|
||||
|
||||
return r_value;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Dereference DEFAULT values
|
||||
*/
|
||||
int
|
||||
asn1f_fix_dereference_defaults(arg_t *arg) {
|
||||
asn1p_expr_t *expr = arg->expr;
|
||||
int r_value = 0;
|
||||
|
||||
if(expr->marker.default_value) {
|
||||
arg_t tmparg = *arg;
|
||||
asn1p_expr_t tmpexpr = *expr;
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
|
||||
int asn1f_fix_dereference_values(arg_t *);
|
||||
|
||||
int asn1f_fix_dereference_defaults(arg_t *);
|
||||
|
||||
#endif /* _ASN1FIX_DEREFV_H_ */
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
-- OK: Everything is Fine
|
||||
|
||||
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
|
||||
-- .spelio.software.asn1c.test (9363.1.5.1)
|
||||
-- .68
|
||||
|
||||
ModuleTestEnumeratedDefault
|
||||
{ iso org(3) dod(6) internet(1) private(4) enterprise(1)
|
||||
spelio(9363) software(1) asn1c(5) test(1) 68 }
|
||||
DEFINITIONS ::=
|
||||
BEGIN
|
||||
|
||||
Type ::= SEQUENCE {
|
||||
reportAmount ReportAmount DEFAULT ra-default,
|
||||
reportInterval INTEGER
|
||||
}
|
||||
|
||||
ReportAmount ::= ENUMERATED { a, b, c, ra-default }
|
||||
|
||||
END
|
Loading…
Reference in New Issue