-// Copyright (C) 2006-2008 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016 CEA/DEN, EDF R&D
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// --- include from engine first, to avoid redifinition warning _POSIX_C_SOURCE
//
#include "TypeConversions.hxx"
{
DEBTRACE(" --- recursive blocs, check constituants" );
- // --- Bloc_2 with Bloc_1 and Bloc_2
+ // --- Bloc_2 with Bloc_0, Bloc_1 and Node_3
{
ostringstream ss;
ss << "Bloc_" << _ibloc++;
PyObject *ob=((OutputPyPort*)_nodeMap["Node_11"]->getOutputPort("c"))->get();
DEBTRACE("ob refcnt: " << ob->ob_refcnt);
- PyObject_Print(ob,stdout,Py_PRINT_RAW);
+ std::cerr << "Output port Node_11.c: ";
+ PyGILState_STATE gstate = PyGILState_Ensure();
+ PyObject_Print(ob,stderr,Py_PRINT_RAW);
+ PyGILState_Release(gstate);
+ std::cerr << std::endl;
// DEBTRACE("a: " << &a);
// DEBTRACE("a.value(): " << a.value());
}
DEBTRACE("Put a " << type[jtype] << " double (" << d0 << ") in " << s);
- pwrap->put(v);
+ if (jtype == 2)
+ {
+ PyGILState_STATE gstate = PyGILState_Ensure();
+ pwrap->put(v);
+ PyGILState_Release(gstate);
+ }
+ else
+ pwrap->put(v);
cerr << endl;
switch (itype)
u->decrRef();
v->decrRef();
- w->decrRef();
delete node;
node = _myRuntime->createCompoNode("Cpp", "test");
CppComponent * C = new CppComponent("TestComponent");
node->setComponent(C);
+ C->decrRef();
node->setMethod("f");
in = node->edAddInputPort("in", _tc_double);
u->decrRef();
v->decrRef();
- w->decrRef();
delete node;
CppComponent *C = new CppComponent("TestComponent");
((CppNode *) n1)->setComponent(C);
+ C->decrRef();
((CppNode *) n1)->setMethod("f");
in1 = n1->edAddInputPort("i", _tc_double);
out1 = n1->edAddOutputPort("o", _tc_double);
if (endTests) return;
endTests = true;
+
+ delete _blocMap["Bloc_3"];
+ delete _blocMap["Bloc_2"];
+ delete _nodeMap["Node_4"];
+ delete _nodeMap["Node_5"];
+ delete _nodeMap["Node_6"];
+ delete _nodeMap["Node_7"];
+ delete _nodeMap["Node_8"];
+ delete _nodeMap["Node_9"];
+
_tc_seqC->decrRef();
_tc_C->decrRef();
list<TypeCodeObjref *>::iterator i;
_tc_seqlong->decrRef();
_tc_string->decrRef();
+ _myRuntime->fini();
delete _myRuntime;
}
+