]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Debug : Python char type == string
authorrahuel <rahuel@opencascade.com>
Fri, 10 Jun 2005 08:05:47 +0000 (08:05 +0000)
committerrahuel <rahuel@opencascade.com>
Fri, 10 Jun 2005 08:05:47 +0000 (08:05 +0000)
Traces + Comments

src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx

index 1f54017e9c50f0c3fc6dd4ed6c419f3f50afa742..dde00a3a9e0f8b991df51800d30fa699d2c2fdef 100644 (file)
@@ -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( ... ) {