X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FDistributedPythonNode.cxx;h=bf78b6d30d9f462f34ba995814133d778b86f76f;hb=0716fd562e4f709b42f40ce827a9ca02ac70634f;hp=edd891af98413381e2bebdb4c751263ac7ee27fc;hpb=cad20d9b51f1a2f09e37db59e183e1462ea120f9;p=modules%2Fyacs.git diff --git a/src/runtime/DistributedPythonNode.cxx b/src/runtime/DistributedPythonNode.cxx index edd891af9..bf78b6d30 100644 --- a/src/runtime/DistributedPythonNode.cxx +++ b/src/runtime/DistributedPythonNode.cxx @@ -72,7 +72,7 @@ void DistributedPythonNode::load() _errorDetails=msg.str(); throw Exception(msg.str()); } - const char picklizeScript[]="import cPickle\ndef pickleForDistPyth2009(*args,**kws):\n return cPickle.dumps((args,kws),-1)\n\ndef unPickleForDistPyth2009(st):\n args=cPickle.loads(st)\n return args\n"; + const char picklizeScript[]="import pickle\ndef pickleForDistPyth2009(*args,**kws):\n return pickle.dumps((args,kws),-1)\n\ndef unPickleForDistPyth2009(st):\n args=pickle.loads(st)\n return args\n"; PyObject *res=PyRun_String(picklizeScript,Py_file_input,_context,_context); if(res == NULL) { @@ -113,13 +113,12 @@ void DistributedPythonNode::load() if(!_container) throw Exception("No container specified !"); SalomeContainer *containerCast0(dynamic_cast(_container)); - SalomeHPContainer *containerCast1(dynamic_cast(_container)); + SalomeHPContainerBase *containerCast1(dynamic_cast(_container)); if(containerCast0) objContainer=containerCast0->getContainerPtr(this); else if(containerCast1) { - YACS::BASES::AutoCppPtr tmpCont(SalomeContainerTmpForHP::BuildFrom(containerCast1,this)); - objContainer=tmpCont->getContainerPtr(this); + objContainer=containerCast1->getContainerPtr(this); } else throw Exception("Unrecognized type of container ! Salome one is expected !"); @@ -181,7 +180,7 @@ void DistributedPythonNode::execute() PyTuple_SetItem(args,pos,ob); } PyObject *serializationInput=PyObject_CallObject(_pyfuncSer,args); - std::string serializationInputC=PyString_AsString(serializationInput); + std::string serializationInputC=PyBytes_AsString(serializationInput); serializationInputCorba=new Engines::pickledArgs; int len=serializationInputC.length(); serializationInputCorba->length(serializationInputC.length()); @@ -213,7 +212,7 @@ void DistributedPythonNode::execute() { AutoGIL agil; args = PyTuple_New(1); - PyObject* resultPython=PyString_FromString(resultCorbaC); + PyObject* resultPython=PyBytes_FromString(resultCorbaC); delete [] resultCorbaC; PyTuple_SetItem(args,0,resultPython); PyObject *finalResult=PyObject_CallObject(_pyfuncUnser,args); @@ -238,7 +237,7 @@ void DistributedPythonNode::execute() { OutputPyPort *p=(OutputPyPort *)*iter; DEBTRACE( "port name: " << p->getName() ); - DEBTRACE( "port kind: " << p->edGetType()->kind() ); + DEBTRACE( "port kind: " << p->typeName() ); DEBTRACE( "port pos : " << pos ); if(PyTuple_Check(finalResult))ob=PyTuple_GetItem(finalResult,pos) ; else ob=finalResult;