Fix bug with AXIS_REF allocation
authorLaurent Bessard
Fri, 20 Jul 2012 02:13:07 +0200
changeset 2069 840d328560f8
parent 2068 05a267b1a362
child 2070 dee8d519f3ff
Fix bug with AXIS_REF allocation
etherlab/etherlab.py
etherlab/plc_cia402node.c
--- a/etherlab/etherlab.py	Mon Jun 25 20:06:17 2012 +0200
+++ b/etherlab/etherlab.py	Fri Jul 20 02:13:07 2012 +0200
@@ -982,7 +982,7 @@
                                             self.Controler.GetSizeOfType(entry_type)):
                                             raise ValueError, message
                                         else:
-                                            self.Controler.GetCTRoot().logger.write_warning(message + "\n")
+                                            self.Controler.GetCTRoot().logger.write_warning(_("Warning: ") + message + "\n")
                                     
                                     if (entry_infos["dir"] == "I" and pdo_type != "Inputs" or 
                                         entry_infos["dir"] == "Q" and pdo_type != "Outputs"):
--- a/etherlab/plc_cia402node.c	Mon Jun 25 20:06:17 2012 +0200
+++ b/etherlab/plc_cia402node.c	Fri Jul 20 02:13:07 2012 +0200
@@ -46,7 +46,8 @@
 int __init_%(location)s()
 {
 %(init_entry_variables)s
-	*__IW%(location)s_0 = __MK_Alloc_AXIS_REF(&(__CIA402Node_%(location)s.axis));
+	*__IW%(location)s_0 = __MK_Alloc_AXIS_REF();
+	__CIA402Node_%(location)s.axis = __MK_GetPublic_AXIS_REF(*__IW%(location)s_0);
 	return 0;
 }