diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-05 10:54:48 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-05 10:54:48 +0000 |
commit | 794473ca1924ddbc0a1e8bebe6f0724bf7d2e04b (patch) | |
tree | abd144716bc25b9580bef9205e7fed4deb138a53 /sca-cpp/trunk/modules/python | |
parent | aa27694514363589150efe13249ce9ea39694d63 (diff) |
Integrated python support with HTTPD server module. Changed test case to use a python component implementation.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@895982 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/python')
-rw-r--r-- | sca-cpp/trunk/modules/python/eval.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/python/eval.hpp b/sca-cpp/trunk/modules/python/eval.hpp index 8759534eff..4631ed485d 100644 --- a/sca-cpp/trunk/modules/python/eval.hpp +++ b/sca-cpp/trunk/modules/python/eval.hpp @@ -144,6 +144,7 @@ PyObject* valueToPyObject(const value& v) { case value::Lambda: return mkPyLambda(v); case value::Symbol: + return PyString_FromString(c_str(string("'") + v)); case value::String: return PyString_FromString(c_str(v)); case value::Number: @@ -197,8 +198,12 @@ struct pyCallable { * Convert a python object to a value. */ const value pyObjectToValue(PyObject *o) { - if (PyString_Check(o)) - return value(string(PyString_AsString(o))); + if (PyString_Check(o)) { + const char* s = PyString_AsString(o); + if (*s == '\'') + return value(s + 1); + return value(string(s)); + } if (PyBool_Check(o)) return value(o == Py_True); if (PyInt_Check(o)) |