Commit 5498f2d6 authored by Lev Walkin's avatar Lev Walkin

extended marker

parent 0204fa63
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment