【发布时间】:2012-11-23 05:32:14
【问题描述】:
如何在 swig 中使用 typemap 转换 python 列表。 例如:
lst = [1.0,2.0,3.3] (Python list)
传递给
void print_arg(double *lst){} (c/c++ function)
如何为此编写 swig 接口文件。
【问题讨论】:
-
@karthikT 感谢您的参考链接
-
print_arg如何知道列表中有多少值?改用print_arg(const std::vector<double>& lst)并像我在other question 中建议的那样声明接口。