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
评论列表
文章目录