Bug with type conversion not well generated fixed
authorlaurent
Wed, 02 Sep 2009 18:20:46 +0200
changeset 405 2c598d24205f
parent 404 d5a5eaea7844
child 406 af07b091bbee
Bug with type conversion not well generated fixed
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