Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我得到一个 glibgpointer到一个 glibgslist并想迭代后者,我该怎么做?
gpointer
gslist
我什至不知道如何gslist与gpointer初学者一起去!
更新:我找到了一个解决方法——这个实例中的 python 绑定不完整,所以我必须找到另一个解决方案。
在您的应用程序中如何glib接触 Python?通过 SWIG、ctypes 或其他方式?
glib
您基本上应该使用glib自己的函数来遍历列表。类似的东西g_slist_foreach。只需将指针及其其他参数传递给它即可完成这项工作。同样,这在很大程度上取决于您glib在 Python 应用程序中的访问方式。
g_slist_foreach