summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/python/eval.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/python/eval.hpp')
-rw-r--r--sca-cpp/trunk/modules/python/eval.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sca-cpp/trunk/modules/python/eval.hpp b/sca-cpp/trunk/modules/python/eval.hpp
index 9b75945cf2..0ff68a6a1d 100644
--- a/sca-cpp/trunk/modules/python/eval.hpp
+++ b/sca-cpp/trunk/modules/python/eval.hpp
@@ -135,8 +135,10 @@ PyObject* pyLambda_getattr(PyObject *self, PyObject *attrname) {
if (substr(name, 0, 1) == "_")
return PyObject_GenericGetAttr(self, attrname);
- if (name == "eval")
+ if (name == "eval") {
+ Py_INCREF(self);
return self;
+ }
const pyLambda* pyl = (pyLambda*)self;
debug(name, "python::getattr::name");