Py_ext: use non-derived type when generating C code for handling Python PLC globals.
authorEdouard Tisserant
Thu, 18 Jun 2020 14:18:16 +0200
changeset 2681 abc2088aac4e
parent 2680 6bfed6757495
child 2682 4d3320fdab19
child 2985 2ddedeb035e0
Py_ext: use non-derived type when generating C code for handling Python PLC globals.
py_ext/PythonFileCTNMixin.py
--- a/py_ext/PythonFileCTNMixin.py	Wed Jun 17 14:32:55 2020 +0200
+++ b/py_ext/PythonFileCTNMixin.py	Thu Jun 18 14:18:16 2020 +0200
@@ -119,7 +119,7 @@
                 "opts": repr(variable.getopts()),
                 "configname": configname.upper(),
                 "uppername": variable.getname().upper(),
-                "IECtype": variable.gettype(),
+                "IECtype": self.GetCTRoot().GetBaseType(variable.gettype()),
                 "initial": repr(variable.getinitial()),
                 "pyextname": pyextname
             },