Project

General

Profile

Revision 51768260 src/types.ml

View differences:

src/types.ml
216 216
  match ty.tdesc with
217 217
  | (Ttuple ty_list) -> { ty with tdesc = Ttuple (List.map f ty_list) }
218 218
  | _                -> f ty
219

  
220
let rec is_struct_type ty =
221
 match (repr ty).tdesc with
222
 | Tstruct _        -> true
223
 | _                -> false
224

  
219 225
let rec is_array_type ty =
220 226
 match (repr ty).tdesc with
221 227
 | Tarray _         -> true
222
 | Tstatic (_, ty') -> is_array_type ty'
228
 | Tstatic (_, ty') -> is_array_type ty' (* looks strange !? *)
223 229
 | _                -> false
224 230

  
225 231
let array_type_dimension ty =
......
244 250
  | Tstatic (_, ty') -> array_base_type ty'
245 251
  | _                -> ty
246 252

  
253
let is_address_type ty =
254
  is_array_type ty || is_struct_type ty
255

  
247 256
let rec is_generic_type ty =
248 257
 match (dynamic_type ty).tdesc with
249 258
  | Tarray (d, ty') ->

Also available in: Unified diff