Skip to content
Snippets Groups Projects
Commit 68569d6e authored by florent's avatar florent
Browse files

Fix memory issue

    * src/entity-py.cc.
parent 80238f95
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,6 @@ using dynamicgraph::SignalBase; ...@@ -19,7 +19,6 @@ using dynamicgraph::SignalBase;
using dynamicgraph::ExceptionAbstract; using dynamicgraph::ExceptionAbstract;
using dynamicgraph::command::Command; using dynamicgraph::command::Command;
using dynamicgraph::command::Value; using dynamicgraph::command::Value;
using dynamicgraph::command::AnyType;
namespace dynamicgraph { namespace dynamicgraph {
namespace python { namespace python {
...@@ -31,7 +30,7 @@ namespace dynamicgraph { ...@@ -31,7 +30,7 @@ namespace dynamicgraph {
static void destroy (void* self); static void destroy (void* self);
static Value pythonToValue(PyObject* pyObject, static Value pythonToValue(PyObject* pyObject,
const Value::Type& valueType); const Value::Type& valueType);
static PyObject* valueToPython(Value value); static PyObject* valueToPython(const Value& value);
/** /**
\brief Create an instance of Entity \brief Create an instance of Entity
*/ */
...@@ -174,14 +173,13 @@ namespace dynamicgraph { ...@@ -174,14 +173,13 @@ namespace dynamicgraph {
std::cout << "string param = \"" << dvalue << "\"" << std::endl; std::cout << "string param = \"" << dvalue << "\"" << std::endl;
return Value(svalue); return Value(svalue);
break; break;
default:
std::cerr << "Only int, double and string are supported."
<< std::endl;
} }
std::cerr << "Only int, double and string are supported."
<< std::endl;
return Value(); return Value();
} }
PyObject* valueToPython(Value value) PyObject* valueToPython(const Value& value)
{ {
int intValue; int intValue;
double doubleValue; double doubleValue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment