def make_function_type(cfnptr):
 if (cfnptr.argtypes is None):
  raise TypeError(("ctypes function %r doesn't define its argument types; consider setting the `argtypes` attribute" % (cfnptr.__name__,)))
 cargs = [from_ctypes(a) for a in cfnptr.argtypes]
 cret = from_ctypes(cfnptr.restype)
 if ((sys.platform == 'win32') and (not (cfnptr._flags_ & ctypes._FUNCFLAG_CDECL))):
  cconv = 'x86_stdcallcc'
 else:
  cconv = None
 sig = templates.signature(cret, *cargs)
 return types.ExternalFunctionPointer(sig, cconv=cconv, get_pointer=get_pointer)

def make_function_type ( cfnptr ) : if ( cfnptr . argtypes is None ) : raise TypeError ( ( "ctypes function %r doesn't define its argument types; consider setting the `argtypes` attribute" % ( cfnptr . __name__ , ) ) ) cargs = [ from_ctypes ( a ) for a in cfnptr . argtypes ] cret = from_ctypes ( cfnptr . restype ) if ( ( sys . platform == 'win32' ) and ( not ( cfnptr . _flags_ & ctypes . _FUNCFLAG_CDECL ) ) ) : cconv = 'x86_stdcallcc' else : cconv = None sig = templates . signature ( cret , * cargs ) return types . ExternalFunctionPointer ( sig , cconv = cconv , get_pointer = get_pointer )
return a numba type for the given ctypes function pointer .