]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/runtime/PythonNode.cxx
Salome HOME
[EDF27816] Management of double foreach and management of proxyfile lifecycle
[modules/yacs.git] / src / runtime / PythonNode.cxx
index d124da6a3cb3d6bdd88c7fa0d9a5ab1e57535638..ec172ff4ba0e885da7e2ad193a194b4d1ba0b1c5 100644 (file)
@@ -328,6 +328,13 @@ bool PythonEntry::hasImposedResource()const
   return !_imposedResource.empty() && !_imposedContainer.empty();
 }
 
+bool PythonEntry::IsProxy( PyObject *ob )
+{
+  if(!_pyClsBigObject)
+    return false;
+  return PyObject_IsInstance( ob, _pyClsBigObject) == 1;
+}
+
 bool PythonEntry::GetDestroyStatus( PyObject *ob )
 {
   if(!_pyClsBigObject)
@@ -718,7 +725,7 @@ void PythonNode::executeLocal()
   DEBTRACE( "++++++++++++++ PyNode::executeLocal: " << getName() << " ++++++++++++++++++++" );
   {
     AutoGIL agil;
-    std::ostringstream unpxy; unpxy << "from SALOME_PyNode import UnProxyObjectSimple" << std::endl;
+    std::ostringstream unpxy; unpxy << "from SALOME_PyNode import UnProxyObjectSimpleLocal" << std::endl;
     DEBTRACE( "---------------PyNode::inputs---------------" );
     list<InputPort *>::iterator iter2;
     for(iter2 = _setOfInputPort.begin(); iter2 != _setOfInputPort.end(); iter2++)
@@ -727,8 +734,8 @@ void PythonNode::executeLocal()
         DEBTRACE( "port name: " << p->getName() );
         DEBTRACE( "port kind: " << p->edGetType()->kind() );
         PyObject* ob=p->getPyObj();
-        DEBTRACE( "ob refcnt: " << ob->ob_refcnt );
-        unpxy << p->getName() << " = UnProxyObjectSimple( " << p->getName() << " )" << std::endl;
+        DEBTRACE( "ob refcnt: " << ob->ob_refcnt ); 
+        unpxy << p->getName() << " = UnProxyObjectSimpleLocal( " << p->getName() << " )" << std::endl;
 #ifdef _DEVDEBUG_
         PyObject_Print(ob,stderr,Py_PRINT_RAW);
         cerr << endl;