- Jan 09, 2026
-
-
1. 收集接口中出现过的 `vector | map` 实例化容器引用类型 2. 生成`pybind11_opaque.hpp`文件调用`PYBIND11_MAKE_OPAQUE(T)`,用于消除`pybind11/stl_bind.hpp`中对实例化容器类型`T`的自动cast。对于引用了`pybind11/stl_bind.hpp`的位置都需要同时引用`pybind11_opaque.hpp`,否则会出现映射错误 3. 在`binder`接口(绑定接口统一调用入口)中调用`bind_vector<T, name>`,`pybind11::bind_map<T, name>`,完成容器的引用语义自动绑定。(pybind11不支持set的引用语义自动绑定) 4. 在接口参数,返回值,变量翻译中,针对收集的实例化容器类型进行区分绑定: a. 若为`vector&,map& `采用引用语义绑定; b. 若为`vector,map,const vector &, const map &`,则用lambda函数包装原生接口,使用`pybind11::list` 或 `pybind11::dict`类型绑定cpp `vector`或`map`类型 5. 对于模板嵌套类型,如`std::vector<std::vector<std::string>>>`,其中模板参数类型`std::vector<std::string>>`,会被翻译为默认类型,即若`std::vector<std::string>>`默认绑定为`ListString`,则`std::vector<std::vector<std::string>>>&` 被翻译为 `ListListString`, 内部储存`ListString`;`std::vector<std::vector<std::string>>>` 和 `const std::vector<std::vector<std::string>>> &` 被翻译为 `list[ListString]`
- Dec 19, 2025
-
- Dec 12, 2025
-
- Dec 04, 2025
-
- Sep 19, 2025
-
-
chenyang.wang authored
Resolve "CABI set 迭代器" Closes #400 See merge request !358
-
-
- Aug 22, 2025
-
- Aug 12, 2025
-
- Jul 22, 2025
-
- Jul 18, 2025
-
- Jul 09, 2025
-
- Jun 13, 2025
-
- Jun 06, 2025
-
- Jun 04, 2025
-
- May 28, 2025
-
-
fix: C接口,通过全局信息收集头文件信息,解决前置声明问题。引入头文件方式为`*_types.h`,避免循环依赖问题。删除`extra_header`结构,因为不再需要用户手动输入前置声明依赖的头文件内容。
- May 22, 2025
-
- May 20, 2025
-
- May 19, 2025
-
- Apr 25, 2025
-
-
mingfa.yang authored