code: def _c_func(func, restype, argtypes, errcheck=None):
      
      func.restype = restype
      func.argtypes = argtypes
      if errcheck is not None:
          func.errcheck = errcheck
      return func
docs: Wrap c function setting prototype.