core.py 文件源码

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

项目:pncpp 作者: amadxx 项目源码 文件源码
def __call__(self, *args):
        if not self.c_method:
            raise AttributeError("Method not resolved")

        nargs = list(args)
        for i, arg in enumerate(nargs):
            if issubclass(type(arg), CXXStruct):
                c_type = self.c_args[i]
                if issubclass(c_type, ctypes._Pointer):
                    nargs[i] = arg.this
                elif issubclass(c_type, ctypes.Structure):
                    nargs[i] = arg.struct
        if self.override:
            result = self.v_method(*nargs)
        else:
            result = self.c_method(*nargs)
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号