标签:python-cffi

  • AttributeError:获取所有权或释放cdata时释放 - python

    时间:2020-7-14

    如果我想拥有在C中malloc的指针的所有权,则docs for the Python cffi package和this answer表示使用ffi.gc和lib.free作为析构函数。但是,当我这样做时,在调用AttributeError: free时得到lib.free。 lib.free在哪里定义? from tempfile import Temp […]