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;
using dynamicgraph::ExceptionAbstract;
using dynamicgraph::command::Command;
using dynamicgraph::command::Value;
using dynamicgraph::command::AnyType;
namespace dynamicgraph {
namespace python {
......@@ -31,7 +30,7 @@ namespace dynamicgraph {
static void destroy (void* self);
static Value pythonToValue(PyObject* pyObject,
const Value::Type& valueType);
static PyObject* valueToPython(Value value);
static PyObject* valueToPython(const Value& value);
/**
\brief Create an instance of Entity
*/
......@@ -174,14 +173,13 @@ namespace dynamicgraph {
std::cout << "string param = \"" << dvalue << "\"" << std::endl;
return Value(svalue);
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();
}
PyObject* valueToPython(Value value)
PyObject* valueToPython(const Value& value)
{
int intValue;
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