# HG changeset patch # User laurent # Date 1251908446 -7200 # Node ID 2c598d24205f0249193ac4c777c0149e53d34af3 # Parent d5a5eaea78443c4a74bf01ea3dbf355f1e30417c Bug with type conversion not well generated fixed diff -r d5a5eaea7844 -r 2c598d24205f plcopen/structures.py --- a/plcopen/structures.py Tue Sep 01 16:59:37 2009 +0200 +++ b/plcopen/structures.py Wed Sep 02 18:20:46 2009 +0200 @@ -423,7 +423,7 @@ ANY_TO_ANY_LIST=[ # simple type conv are let as C cast - (("ANY_NUM","ANY_BIT"),("ANY_NUM","ANY_BIT"), ("return_type", None, None)), + (("ANY_NUM","ANY_BIT"),("ANY_NUM","ANY_BIT"), ("return_type", "__move_", "IN_type")), # TO_TIME (("ANY_INT","ANY_BIT"),("ANY_DATE","TIME"), ("return_type", "__int_to_time", None)), (("ANY_REAL",),("ANY_DATE","TIME"), ("return_type", "__real_to_time", None)), @@ -469,8 +469,6 @@ outs = reduce(lambda a,b: a or b, map(lambda testtype : IsOfType(fdecl["outputs"][0][1],testtype), OutTypes)) inps = reduce(lambda a,b: a or b, map(lambda testtype : IsOfType(fdecl["inputs"][0][1],testtype), InTypes)) if inps and outs and fdecl["outputs"][0][1] != fdecl["inputs"][0][1]: - if Format[1] is None: - return (Format[0], "__move_", "IN_type") return Format return None