def from_ctypes(ctypeobj):
 if (ctypeobj is None):
  return types.none
 assert isinstance(ctypeobj, type), ctypeobj
 def _convert_internal(ctypeobj):
  if issubclass(ctypeobj, ctypes._Pointer):
   valuety = _convert_internal(ctypeobj._type_)
   if (valuety is not None):
    return types.CPointer(valuety)
  else:
   return _FROM_CTYPES.get(ctypeobj)
 ty = _convert_internal(ctypeobj)
 if (ty is None):
  raise TypeError(('Unsupported ctypes type: %s' % ctypeobj))
 return ty

def from_ctypes ( ctypeobj ) : if ( ctypeobj is None ) : return types . none assert isinstance ( ctypeobj , type ) , ctypeobj def _convert_internal ( ctypeobj ) : if issubclass ( ctypeobj , ctypes . _Pointer ) : valuety = _convert_internal ( ctypeobj . _type_ ) if ( valuety is not None ) : return types . CPointer ( valuety ) else : return _FROM_CTYPES . get ( ctypeobj ) ty = _convert_internal ( ctypeobj ) if ( ty is None ) : raise TypeError ( ( 'Unsupported ctypes type: %s' % ctypeobj ) ) return ty
convert the given ctypes type to a numba type .