# HG changeset patch # User Edouard Tisserant # Date 1434699258 -7200 # Node ID de311ffe3961dbda2248f9785fd06e37ad1976ff # Parent 9ee3a2dea7e8d8c3ed8b10f7b86c37ecdfc0d8c7 Changed runtime's global PLCID to PLC_ID, working around redefinition in windoze' headers. diff -r 9ee3a2dea7e8 -r de311ffe3961 runtime/PLCObject.py --- a/runtime/PLCObject.py Thu Jun 18 15:22:43 2015 +0200 +++ b/runtime/PLCObject.py Fri Jun 19 09:34:18 2015 +0200 @@ -142,9 +142,9 @@ self._PLClibraryHandle = dlopen(self._GetLibFileName()) self.PLClibraryHandle = ctypes.CDLL(self.CurrentPLCFilename, handle=self._PLClibraryHandle) - self.PLCID = ctypes.c_char_p.in_dll(self.PLClibraryHandle, "PLCID") + self.PLC_ID = ctypes.c_char_p.in_dll(self.PLClibraryHandle, "PLC_ID") if len(md5) == 32 : - self.PLCID.value = md5 + self.PLC_ID.value = md5 self._startPLC = self.PLClibraryHandle.startPLC self._startPLC.restype = ctypes.c_int diff -r 9ee3a2dea7e8 -r de311ffe3961 targets/plc_main_head.c --- a/targets/plc_main_head.c Thu Jun 18 15:22:43 2015 +0200 +++ b/targets/plc_main_head.c Fri Jun 19 09:34:18 2015 +0200 @@ -25,7 +25,7 @@ IEC_TIME __CURRENT_TIME; IEC_BOOL __DEBUG = 0; unsigned long __tick = 0; -char *PLCID = NULL; +char *PLC_ID = NULL; /* * Variable generated by C softPLC and plugins diff -r 9ee3a2dea7e8 -r de311ffe3961 tests/python/c_code@c_ext/cfile.xml --- a/tests/python/c_code@c_ext/cfile.xml Thu Jun 18 15:22:43 2015 +0200 +++ b/tests/python/c_code@c_ext/cfile.xml Fri Jun 19 09:34:18 2015 +0200 @@ -14,7 +14,7 @@ volatile char PtoC=1,CtoP=2; extern long AtomicCompareExchange(long*,long, long); -extern char *PLCID; +extern char *PLC_ID; int Simple_C_Call(int val){ return val+1; @@ -35,7 +35,7 @@ res=1; } printf("C code called by Python: toC %d fromC %d\n",toC,*fromC); - printf("PLCID id %s\n",PLCID); + printf("PLC_ID id %s\n",PLC_ID); return res; }