草庐IT

antichain

全部标签

python - ctypes 回调函数的无效结果类型

我在使用ctypes实现时遇到问题。我有2个C函数:antichain**decompose_antichain(antichain*,int,char(*)(void*,void*),void**(*)(void*));counting_function**decompose_counting_function(counting_function*);其中antichain和counting_function是两个结构。反链可以看作一个集合,包含未知类型的元素(在这个例子中,counting_function)。decompose_antichain函数将用于分解反链包含的元素的函数