py_ext/plc_python.c
branch1.1 Korean release
changeset 1384 02fe382c4511
parent 1288 adc79fc44079
child 1410 0d34b69cc9b5
child 1469 86797748c2a2
--- a/py_ext/plc_python.c	Wed Jul 31 10:45:07 2013 +0900
+++ b/py_ext/plc_python.c	Mon Nov 18 12:12:31 2013 +0900
@@ -163,7 +163,6 @@
 	LockPython();
 	/* Get current FB */
 	data__ = EvalFBs[Current_Python_EvalFB];
-	*id=data__;
 	if(data__ && /* may be null at first run */
 	    __GET_VAR(data__->STATE) == PYTHON_FB_PROCESSING){ /* some answer awaited*/
 	   	/* If result not None */
@@ -209,6 +208,7 @@
 	__SET_VAR(data__->, BUFFER, 0, .body[__GET_VAR(data__->BUFFER, .len)]);
 	/* next command is BUFFER */
 	next_command = (char*)__GET_VAR(data__->BUFFER, .body);
+	*id=data__;
 	/* free python mutex */
 	UnLockPython();
 	/* return the next command to eval */