#include "TypeCode.hxx"
#include "WhileLoop.hxx"
#include "ForLoop.hxx"
+#include "ForEachLoop.hxx"
#include "SalomeOptimizerLoop.hxx"
#include "Bloc.hxx"
#include "InputPort.hxx"
#include "PresetPorts.hxx"
#include "InputDataStreamPort.hxx"
#include "OutputDataStreamPort.hxx"
+#include "Switch.hxx"
#include "SalomeProc.hxx"
#include "PyStdout.hxx"
//Catalog Loaders
typeMap["seqboolvec"]= createSequenceTc("seqboolvec","seqboolvec",typeMap["boolvec"]);
std::list<TypeCodeObjref *> ltc;
typeMap["pyobj"]= createInterfaceTc("python:obj:1.0","pyobj",ltc);
+ typeMap["seqpyobj"]= createSequenceTc("seqpyobj","seqpyobj",typeMap["pyobj"]);
+ composednodeMap["Bloc"]=createBloc("Bloc");
+ composednodeMap["Switch"]=createSwitch("Switch");
+ composednodeMap["WhileLoop"]=createWhileLoop("WhileLoop");
+ composednodeMap["ForLoop"]=createForLoop("ForLoop");
+ composednodeMap["ForEachLoop_double"]=createForEachLoop("ForEachLoop_double",Runtime::_tc_double);
+ composednodeMap["ForEachLoop_string"]=createForEachLoop("ForEachLoop_string",Runtime::_tc_string);
+ composednodeMap["ForEachLoop_int"]=createForEachLoop("ForEachLoop_int",Runtime::_tc_int);
+ composednodeMap["ForEachLoop_bool"]=createForEachLoop("ForEachLoop_bool",Runtime::_tc_bool);
+ composednodeMap["ForEachLoop_pyobj"]=createForEachLoop("ForEachLoop_pyobj",typeMap["pyobj"]);;
ENGINE::TypeCodeStruct *t = createStructTc("","Engines/dataref");
t->addMember("ref",_tc_string);
typeMap["dataref"]= t;
PyObject* ob;
if(data)
{
+ // The call to PyGILState_Ensure was moved here because there was also
+ // a crash when calling convertNeutralPyObject with a sequence of pyobj.
+ // see also the comment below.
+ PyGILState_STATE gstate = PyGILState_Ensure();
ob=convertNeutralPyObject(type,data);
std::string s=convertPyObjectToString(ob);
// lock. I thus added the call to PyGILState_Ensure / PyGILState_Release. It worked fine in
// Python 2.6 without this call. If anyone finds the real reason of this bug and another fix,
// feel free to change this code.
- PyGILState_STATE gstate = PyGILState_Ensure();
+ //PyGILState_STATE gstate = PyGILState_Ensure();
Py_DECREF(ob);
PyGILState_Release(gstate);
return s;