def _load_libc(self):
self._libc = cdll.LoadLibrary('libc.dylib')
# set the types of parameters
for func_name, argtypes in self.libc_argtypes.items():
if not hasattr(self._libc, func_name):
raise RuntimeError("Not a valid libC library")
setattr(getattr(self._libc, func_name), "argtypes", argtypes)
# set the types of return value
for func_name, restype in self.libc_restypes.items():
setattr(getattr(self._libc, func_name), "restype", restype)
macdivert.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录