mirror of https://gerrit.osmocom.org/asn1c
extended marker
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@348 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
a02b74df32
commit
6ac9b0dc46
|
@ -46,7 +46,7 @@ asn1p_expr_clone(asn1p_expr_t *expr, int skip_extensions) {
|
|||
CLCOPY(meta_type);
|
||||
CLCOPY(expr_type);
|
||||
CLCOPY(tag);
|
||||
CLCOPY(marker); /* OPTIONAL/DEFAULT */
|
||||
CLCOPY(marker.flags); /* OPTIONAL/DEFAULT */
|
||||
CLCOPY(module);
|
||||
CLCOPY(_mark);
|
||||
|
||||
|
@ -62,6 +62,7 @@ asn1p_expr_clone(asn1p_expr_t *expr, int skip_extensions) {
|
|||
CLCLONE(combined_constraints, asn1p_constraint_clone);
|
||||
CLCLONE(params, asn1p_paramlist_clone);
|
||||
CLCLONE(value, asn1p_value_clone);
|
||||
CLCLONE(marker.default_value, asn1p_value_clone);
|
||||
CLCLONE(with_syntax, asn1p_wsyntx_clone);
|
||||
|
||||
/*
|
||||
|
@ -128,6 +129,8 @@ asn1p_expr_free(asn1p_expr_t *expr) {
|
|||
asn1p_paramlist_free(expr->params);
|
||||
if(expr->value)
|
||||
asn1p_value_free(expr->value);
|
||||
if(expr->marker.default_value)
|
||||
asn1p_value_free(expr->marker.default_value);
|
||||
if(expr->with_syntax)
|
||||
asn1p_wsyntx_free(expr->with_syntax);
|
||||
|
||||
|
|
|
@ -173,11 +173,14 @@ typedef struct asn1p_expr_s {
|
|||
asn1_integer_t tag_value;
|
||||
} tag;
|
||||
|
||||
enum asn1p_expr_marker_e {
|
||||
EM_NOMARK,
|
||||
EM_INDIRECT = 0x01, /* 0001: Represent as pointer */
|
||||
EM_OPTIONAL = 0x03, /* 0011: Optional member */
|
||||
EM_DEFAULT = 0x07, /* 0111: FIXME: store the value */
|
||||
struct asn1p_expr_marker_s {
|
||||
enum asn1p_expr_marker_e {
|
||||
EM_NOMARK,
|
||||
EM_INDIRECT = 0x01, /* 0001: Represent as pointer */
|
||||
EM_OPTIONAL = 0x03, /* 0011: Optional member */
|
||||
EM_DEFAULT = 0x07, /* 0111: default_value */
|
||||
} flags;
|
||||
asn1p_value_t *default_value; /* For EM_DEFAULT case */
|
||||
} marker;
|
||||
int unique; /* UNIQUE */
|
||||
|
||||
|
|
Loading…
Reference in New Issue