From: rahuel Date: Fri, 10 Jun 2005 08:05:47 +0000 (+0000) Subject: Debug : Python char type == string X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4451ad39fd36e7b190e66e4b7785858346cfd57a;p=modules%2Fsuperv.git Debug : Python char type == string Traces + Comments --- diff --git a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx index 1f54017..dde00a3 100644 --- a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx @@ -481,7 +481,8 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , } //JR 04.04.2005 Debug if ( !PyInt_Check( ArgValue ) ) { //Difficult to understand that behavior ... Python char type is a string of length 1 ! - if ( !PyString_Check( ArgValue ) ) { +// or type is int ... + if ( !PyString_Check( ArgValue ) && !PyInt_Check( ArgValue ) ) { cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (char)" << endl ; RetVal = false ; } @@ -698,15 +699,15 @@ bool GraphExecutor::InNode::PyRunSimpleString( char* thePyString ) const bool ErrorValue = true; bool aRet; try { - MESSAGE( pthread_self() << "Python method beginning : " << thePyString ); #if PyDynInvokeTrace + MESSAGE( pthread_self() << "Python method beginning : " << thePyString ); cdebug_in << pthread_self() << "Python method beginning : " << thePyString << endl ; #endif aRet = PyRun_SimpleString( thePyString ); // asv : 20.01.05 : changes involved with switching to old (HEAD) KERNEL //aRet = _OutNode->SuperVisionContainer()->ActivatePythonExecution( thePyString ) ; - MESSAGE( pthread_self() << "Python method finished." ); #if PyDynInvokeTrace + MESSAGE( pthread_self() << "Python method finished." ); cdebug_out << pthread_self() << "Python method finished." << endl ; #endif } catch( ... ) {