Salome HOME
Merge branch 'V9_2_2_BR'
[modules/yacs.git] / src / runtime / SalomePythonNode.cxx
index 0e14a9d42d87168a1a105a8a84d715805e16bc50..0232073a469c89bf32d49c8b3c2b8244b18a7932 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019  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.
+// 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
@@ -71,8 +71,8 @@ void SalomePythonNode::load()
   ServiceInlineNode::load();
   cerr << "---------------SalomePythonNode::load function---------------" << endl;
   list<OutputPort *>::iterator iter;
-  string value2Export=((SalomePythonComponent*)_component)->getStringValueToExportInInterp();
-  PyObject* ob=PyString_FromString(value2Export.c_str());
+  string value2Export=((SalomePythonComponent*)_component)->getStringValueToExportInInterp(this);
+  PyObject* ob=PyBytes_FromString(value2Export.c_str());
   PyDict_SetItemString(_context,PLACEMENT_VAR_NAME_IN_INTERP,ob);
   for(iter = _setOfOutputPort.begin(); iter != _setOfOutputPort.end(); iter++)
     {
@@ -194,8 +194,8 @@ void SalomePythonNode::execute()
 
 std::string SalomePythonNode::getKind() const
 {
-  //This not a bug !!! Returns SalomeNode::KIND to be managed by SalomeContainer.
-  return SalomeNode::KIND;
+  static const char LOC_KIND[]="";
+  return LOC_KIND;
 }
 
 Node *SalomePythonNode::simpleClone(ComposedNode *father, bool editionOnly) const