let c_int_of_typ t =
    match object_of t with
      | C_int i -> i
      | _ -> WpLog.fatal "non-integer offset"