tox.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:milisia-tox 作者: milisarge 项目源码 文件源码
def self_get_friend_list(self, friend_list=None):
        """
        Copy a list of valid friend numbers into an array.

        Call tox_self_get_friend_list_size to determine the number of elements to allocate.

        :param friend_list: pointer (c_char_p) to a memory region with enough space to hold the friend list. If this
        parameter is None, this function allocates memory for the friend list.
        :return: friend list
        """
        friend_list_size = self.self_get_friend_list_size()
        if friend_list is None:
            friend_list = create_string_buffer(sizeof(c_uint32) * friend_list_size)
            friend_list = POINTER(c_uint32)(friend_list)
        Tox.libtoxcore.tox_self_get_friend_list(self._tox_pointer, friend_list)
        return friend_list[0:friend_list_size]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号