Commit c91c7040 authored by dbarbera's avatar dbarbera
Browse files

Fixed casting in write statements

parent c9f59d74
......@@ -455,14 +455,12 @@ def write_statement(param, newline):
elif type_kind in ('IntegerType', 'RealType',
'BooleanType', 'Integer32Type'):
code, string, local = expression(param)
if type_kind == 'IntegerType':
if type_kind in ('IntegerType', 'Integer32Type'):
cast = "Asn1Int"
elif type_kind == 'RealType':
cast = 'Long_Float'
elif type_kind == 'BooleanType':
cast = 'Boolean'
elif type_kind == 'Integer32Type':
cast = 'Integer'
string = u"{cast}'Image({s})".format(cast=cast, s=string)
else:
error = (u'Unsupported parameter in write call ' +
......
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