def _get_calling_conv(*args): if sys.platform == 'win32': return ctypes.WINFUNCTYPE(*args) else: return ctypes.CFUNCTYPE(*args)