git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- return 1 for used action
[enigma2.git]
/
lib
/
python
/
python.cpp
diff --git
a/lib/python/python.cpp
b/lib/python/python.cpp
index 9e7e5c215f8b43473d5297d99f3b1cc252cc7439..a1ef1508a2005ac9dd5a3cb481feaf061a70e586 100644
(file)
--- a/
lib/python/python.cpp
+++ b/
lib/python/python.cpp
@@
-95,21
+95,23
@@
int ePython::execute(const std::string &pythonfile, const std::string &funcname)
return 0;
}
return 0;
}
-
void
ePython::call(PyObject *pFunc, PyObject *pArgs)
+
int
ePython::call(PyObject *pFunc, PyObject *pArgs)
{
{
+ int res = -1;
PyObject *pValue;
if (pFunc && PyCallable_Check(pFunc))
{
pValue = PyObject_CallObject(pFunc, pArgs);
if (pValue != NULL)
{
PyObject *pValue;
if (pFunc && PyCallable_Check(pFunc))
{
pValue = PyObject_CallObject(pFunc, pArgs);
if (pValue != NULL)
{
-
printf("Result of call: %ld\n", PyInt_AsLong(pValue)
);
+
res = PyInt_AsLong(pValue
);
Py_DECREF(pValue);
} else
{
PyErr_Print();
}
}
Py_DECREF(pValue);
} else
{
PyErr_Print();
}
}
+ return res;
}
PyObject *ePython::resolve(const std::string &pythonfile, const std::string &funcname)
}
PyObject *ePython::resolve(const std::string &pythonfile, const std::string &funcname)