Skip to content
  1. Jan 09, 2026
    • 邓辉's avatar
      Merge branch '404-pybind11' into 'master' · 60d90d02
      邓辉 authored
      Resolve "pybind11:接口中存在 vector | map 容器引用为参数时,并没有达到引用的效果"
      
      Closes #404
      
      See merge request !362
      60d90d02
    • mingfa.yang's avatar
      fix(pybind11): 修复接口中存在 vector,map 容器引用为参数时,并没有达到引用的效果的问题。 · e2ab0d4e
      mingfa.yang authored and 邓辉's avatar 邓辉 committed
      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]`
      e2ab0d4e
  2. Dec 19, 2025
  3. Dec 12, 2025
  4. Dec 04, 2025
  5. Sep 19, 2025
  6. Aug 22, 2025
  7. Aug 12, 2025
  8. Jul 22, 2025
  9. Jul 18, 2025
  10. Jul 09, 2025
  11. Jun 13, 2025
  12. Jun 06, 2025
  13. Jun 04, 2025
  14. May 28, 2025
    • 邓辉's avatar
      Merge branch '391-cabi' into 'master' · 868fe845
      邓辉 authored
      Resolve "【CABI】:通过共享对象,解决前置声明问题"
      
      Closes #391
      
      See merge request !349
      868fe845
    • chenyang.wang's avatar
      fix:... · c9ec5568
      chenyang.wang authored and 邓辉's avatar 邓辉 committed
      fix: C接口,通过全局信息收集头文件信息,解决前置声明问题。引入头文件方式为`*_types.h`,避免循环依赖问题。删除`extra_header`结构,因为不再需要用户手动输入前置声明依赖的头文件内容。
      c9ec5568
  15. May 22, 2025
  16. May 20, 2025
  17. May 19, 2025
  18. Apr 25, 2025
Loading