curses.py 文件源码

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

项目:transpyler 作者: Transpyler 项目源码 文件源码
def assure_generic_c_level_function(tt, offset):
    """
    Makes sure that the given type tt uses the generic c-level function
    for some of the magic methods such as repr(), str(), etc.
    """

    ref_from_address = ctypes.c_ssize_t.from_address
    tp_func_object = ref_from_address(id(Object) + offset)
    tp_func_cursed = ref_from_address(id(tt) + offset)
    tp_func_cursed.value = tp_func_object.value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号