| 10 | { |
| 11 | void set(std::string msg) { mMsg = msg; } |
| 12 | void many(boost::python::list msgs) { |
| 13 | long l = len(msgs); |
| 14 | std::stringstream ss; |
| 15 | for (long i = 0; i<l; ++i) { |
| 16 | if (i>0) ss << ", "; |
| 17 | std::string s = boost::python::extract<std::string>(msgs[i]); |
| 18 | ss << s; |
| 19 | } |
| 20 | mMsg = ss.str(); |
| 21 | } |
| 22 | std::string greet() { return mMsg; } |
| 23 | std::string mMsg; |
| 24 | }; |