From 19dea8b49b538a1918bd25d814c212fe397b3cad Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Fri, 19 Feb 2016 16:53:43 +0100 Subject: asn1: Generate _free_*ies function declarations ranap_ies_defs.h is checked in so update it hnbap_ies_defs.h and rua_ies_defs.h need to be regenerated --- asn1/utils/asn1tostruct.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'asn1') diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index d1b5292..3519407 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -260,6 +260,18 @@ for key in iesDefs: f.write("int %s_decode_%s(\n" % (fileprefix, firstlower.lower())) f.write(" %sIEs_t *%sIEs,\n" % (asn1cStruct, firstlower)) f.write(" %s_t *%s);\n\n" % (asn1cStruct, lowerFirstCamelWord(asn1cStruct))) + +for key in iesDefs: + keyupperunderscore = re.sub('-', '_', key.upper()) + keylowerunderscore = re.sub('-', '_', key.lower()) + structName = re.sub('ies', '', key) + + if len(iesDefs[key]["ies"]) == 0: + continue + + f.write("int %s_free_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower()))) + if len(iesDefs[key]["ies"]) != 0: + f.write(" %s_t *%s);\n\n" % (prefix + re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key)))) f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper())) #Generate Decode functions -- cgit v1.2.3