Commit 154519a3 authored by Lev Walkin's avatar Lev Walkin

removed superfluous constraints duplication

parent b7a202e5
......@@ -1356,7 +1356,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
// OUT("td->check_constraints "
// "= asn_DEF_%s.check_constraints;\n",
// asn1c_type_name(arg, expr, TNF_SAFE));
OUT("return td->op->check_constraints"
OUT("return td->check_constraints"
"(td, sptr, ctfailcb, app_key);\n");
}
INDENT(-1);
......
......@@ -211,7 +211,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
case ASN_CONSTR_SEQUENCE_OF:
case ASN_CONSTR_SET_OF:
OUT("/* Perform validation of the inner elements */\n");
OUT("return td->op->check_constraints(td, sptr, ctfailcb, app_key);\n");
OUT("return td->check_constraints(td, sptr, ctfailcb, app_key);\n");
break;
default:
OUT("/* Constraint check succeeded */\n");
......
......@@ -15,7 +15,6 @@ asn_TYPE_operation_t asn_OP_ANY = {
OCTET_STRING_free,
OCTET_STRING_print,
OCTET_STRING_compare,
asn_generic_no_constraint,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -21,7 +21,6 @@ asn_TYPE_operation_t asn_OP_BIT_STRING = {
OCTET_STRING_free, /* Implemented in terms of OCTET STRING */
BIT_STRING_print,
BIT_STRING_compare,
BIT_STRING_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_binary,
......
......@@ -27,7 +27,6 @@ asn_TYPE_operation_t asn_OP_BMPString = {
OCTET_STRING_free, /* Implemented in terms of OCTET STRING */
BMPString_print,
OCTET_STRING_compare,
BMPString_constraint,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
BMPString_decode_xer, /* Convert from UTF-8 */
......
......@@ -25,7 +25,6 @@ xer_type_encoder_f BMPString_encode_xer;
#define BMPString_free OCTET_STRING_free
#define BMPString_print BMPString_print
#define BMPString_compare OCTET_STRING_compare
#define BMPString_constraint asn_generic_no_constraint
#define BMPString_decode_ber OCTET_STRING_decode_ber
#define BMPString_encode_der OCTET_STRING_encode_der
#define BMPString_decode_uper OCTET_STRING_decode_uper
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_BOOLEAN = {
BOOLEAN_free,
BOOLEAN_print,
BOOLEAN_compare,
asn_generic_no_constraint,
BOOLEAN_decode_ber,
BOOLEAN_encode_der,
BOOLEAN_decode_xer,
......
......@@ -18,7 +18,6 @@ asn_TYPE_operation_t asn_OP_ENUMERATED = {
ASN__PRIMITIVE_TYPE_free,
INTEGER_print, /* Implemented in terms of INTEGER */
INTEGER_compare, /* Implemented in terms of INTEGER */
asn_generic_no_constraint,
ber_decode_primitive,
INTEGER_encode_der, /* Implemented in terms of INTEGER */
INTEGER_decode_xer, /* This is temporary! */
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_GeneralString = {
OCTET_STRING_free,
OCTET_STRING_print, /* non-ascii string */
OCTET_STRING_compare,
asn_generic_unknown_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -175,7 +175,6 @@ asn_TYPE_operation_t asn_OP_GeneralizedTime = {
OCTET_STRING_free,
GeneralizedTime_print,
OCTET_STRING_compare, /* Does not normalize time zones! */
GeneralizedTime_constraint, /* Check validity of time */
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
GeneralizedTime_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_GraphicString = {
OCTET_STRING_free,
OCTET_STRING_print, /* non-ascii string */
OCTET_STRING_compare,
asn_generic_unknown_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -21,7 +21,6 @@ asn_TYPE_operation_t asn_OP_IA5String = {
OCTET_STRING_free,
OCTET_STRING_print_utf8, /* ASCII subset */
OCTET_STRING_compare,
IA5String_constraint, /* Constraint on the alphabet */
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -18,7 +18,6 @@ asn_TYPE_operation_t asn_OP_INTEGER = {
INTEGER_free,
INTEGER_print,
INTEGER_compare,
asn_generic_no_constraint,
ber_decode_primitive,
INTEGER_encode_der,
INTEGER_decode_xer,
......
......@@ -21,7 +21,6 @@ asn_TYPE_operation_t asn_OP_ISO646String = {
OCTET_STRING_free,
OCTET_STRING_print_utf8, /* ASCII subset */
OCTET_STRING_compare,
VisibleString_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -17,7 +17,6 @@ asn_TYPE_operation_t asn_OP_NULL = {
BOOLEAN_free,
NULL_print,
NULL_compare,
asn_generic_no_constraint,
BOOLEAN_decode_ber, /* Implemented in terms of BOOLEAN */
NULL_encode_der, /* Special handling of DER encoding */
NULL_decode_xer,
......
......@@ -22,7 +22,6 @@ asn_TYPE_operation_t asn_OP_NativeEnumerated = {
NativeInteger_free,
NativeInteger_print,
NativeInteger_compare,
asn_generic_no_constraint,
NativeInteger_decode_ber,
NativeInteger_encode_der,
NativeInteger_decode_xer,
......
......@@ -23,7 +23,6 @@ asn_TYPE_operation_t asn_OP_NativeInteger = {
NativeInteger_free,
NativeInteger_print,
NativeInteger_compare,
asn_generic_no_constraint,
NativeInteger_decode_ber,
NativeInteger_encode_der,
NativeInteger_decode_xer,
......
......@@ -25,7 +25,6 @@ asn_TYPE_operation_t asn_OP_NativeReal = {
NativeReal_free,
NativeReal_print,
NativeReal_compare,
asn_generic_no_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
......
......@@ -41,7 +41,6 @@ asn_TYPE_operation_t asn_OP_NumericString = {
OCTET_STRING_free,
OCTET_STRING_print_utf8, /* ASCII subset */
OCTET_STRING_compare,
NumericString_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -19,7 +19,6 @@ asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = {
ASN__PRIMITIVE_TYPE_free,
OBJECT_IDENTIFIER_print,
OCTET_STRING_compare, /* Implemented in terms of a string comparison */
OBJECT_IDENTIFIER_constraint,
ber_decode_primitive,
der_encode_primitive,
OBJECT_IDENTIFIER_decode_xer,
......
......@@ -28,7 +28,6 @@ asn_TYPE_operation_t asn_OP_OCTET_STRING = {
OCTET_STRING_free,
OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */
OCTET_STRING_compare,
asn_generic_no_constraint,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -12,7 +12,6 @@ asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
OPEN_TYPE_free,
OPEN_TYPE_print,
OPEN_TYPE_compare,
OPEN_TYPE_constraint,
OPEN_TYPE_decode_ber,
OPEN_TYPE_encode_der,
OPEN_TYPE_decode_xer,
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_ObjectDescriptor = {
OCTET_STRING_free,
OCTET_STRING_print_utf8, /* Treat as ASCII subset (it's not) */
OCTET_STRING_compare,
asn_generic_unknown_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -51,7 +51,6 @@ asn_TYPE_operation_t asn_OP_PrintableString = {
OCTET_STRING_free,
OCTET_STRING_print_utf8, /* ASCII subset */
OCTET_STRING_compare,
PrintableString_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -45,7 +45,6 @@ asn_TYPE_operation_t asn_OP_REAL = {
ASN__PRIMITIVE_TYPE_free,
REAL_print,
REAL_compare,
asn_generic_no_constraint,
ber_decode_primitive,
der_encode_primitive,
REAL_decode_xer,
......
......@@ -20,7 +20,6 @@ asn_TYPE_operation_t asn_OP_RELATIVE_OID = {
ASN__PRIMITIVE_TYPE_free,
RELATIVE_OID_print,
OCTET_STRING_compare, /* Implemented in terms of opaque comparison */
asn_generic_no_constraint,
ber_decode_primitive,
der_encode_primitive,
RELATIVE_OID_decode_xer,
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_T61String = {
OCTET_STRING_free,
OCTET_STRING_print, /* non-ascii string */
OCTET_STRING_compare,
asn_generic_unknown_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_TeletexString = {
OCTET_STRING_free,
OCTET_STRING_print, /* non-ascii string */
OCTET_STRING_compare,
asn_generic_unknown_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -32,7 +32,6 @@ asn_TYPE_operation_t asn_OP_UTCTime = {
OCTET_STRING_free,
UTCTime_print,
OCTET_STRING_compare, /* Does not deal with time zones. */
UTCTime_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_utf8,
......
......@@ -17,7 +17,6 @@ asn_TYPE_operation_t asn_OP_UTF8String = {
OCTET_STRING_free,
UTF8String_print,
OCTET_STRING_compare,
UTF8String_constraint, /* Check for invalid codes, etc. */
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -27,7 +27,6 @@ asn_TYPE_operation_t asn_OP_UniversalString = {
OCTET_STRING_free,
UniversalString_print, /* Convert into UTF8 and print */
OCTET_STRING_compare,
UniversalString_constraint,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
UniversalString_decode_xer, /* Convert from UTF-8 */
......
......@@ -16,7 +16,6 @@ asn_TYPE_operation_t asn_OP_VideotexString = {
OCTET_STRING_free,
OCTET_STRING_print, /* non-ascii string */
OCTET_STRING_compare,
asn_generic_unknown_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
......
......@@ -21,7 +21,6 @@ asn_TYPE_operation_t asn_OP_VisibleString = {
OCTET_STRING_free,
OCTET_STRING_print_utf8, /* ASCII subset */
OCTET_STRING_compare,
VisibleString_constraint,
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
......
......@@ -1243,7 +1243,6 @@ asn_TYPE_operation_t asn_OP_CHOICE = {
CHOICE_free,
CHOICE_print,
CHOICE_compare,
CHOICE_constraint,
CHOICE_decode_ber,
CHOICE_encode_der,
CHOICE_decode_xer,
......
......@@ -1524,7 +1524,6 @@ asn_TYPE_operation_t asn_OP_SEQUENCE = {
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
......
......@@ -211,7 +211,6 @@ asn_TYPE_operation_t asn_OP_SEQUENCE_OF = {
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_compare,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
......
......@@ -1055,7 +1055,6 @@ asn_TYPE_operation_t asn_OP_SET = {
SET_free,
SET_print,
SET_compare,
SET_constraint,
SET_decode_ber,
SET_encode_der,
SET_decode_xer,
......
......@@ -976,7 +976,6 @@ asn_TYPE_operation_t asn_OP_SET_OF = {
SET_OF_free,
SET_OF_print,
SET_OF_compare,
SET_OF_constraint,
SET_OF_decode_ber,
SET_OF_encode_der,
SET_OF_decode_xer,
......
......@@ -145,7 +145,6 @@ typedef struct asn_TYPE_operation_s {
asn_struct_free_f *free_struct; /* Free the structure */
asn_struct_print_f *print_struct; /* Human readable output */
asn_struct_compare_f *compare_struct; /* Compare two structures */
asn_constr_check_f *check_constraints; /* Constraints validator */
ber_type_decoder_f *ber_decoder; /* Generic BER decoder */
der_type_encoder_f *der_encoder; /* Canonical DER encoder */
xer_type_decoder_f *xer_decoder; /* Generic XER decoder */
......
......@@ -47,7 +47,7 @@ T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......
......@@ -56,7 +56,7 @@ memb_varsets_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
if((size >= 1)) {
/* Perform validation of the inner elements */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
......@@ -405,7 +405,7 @@ memb_vset_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
if((size >= 1)) {
/* Perform validation of the inner elements */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
......
......@@ -86,7 +86,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......
......@@ -88,7 +88,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......
......@@ -90,7 +90,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......
......@@ -37,7 +37,7 @@ OK_Integer1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......@@ -106,7 +106,7 @@ OK_Integer2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......@@ -175,7 +175,7 @@ OK_Integer3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......@@ -244,7 +244,7 @@ OK_Integer4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......@@ -313,7 +313,7 @@ NO_Integer5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
/* Replace with underlying type checker */
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
......
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