diff --git a/sw/lib/ocaml/pprz.ml b/sw/lib/ocaml/pprz.ml index 90deed0c24..7f77ca8d45 100644 --- a/sw/lib/ocaml/pprz.ml +++ b/sw/lib/ocaml/pprz.ml @@ -172,7 +172,7 @@ let int_assoc = fun (a:string) vs -> let int32_assoc = fun (a:string) vs -> match assoc a vs with - Int32 x -> int_of_string (string_of_value (Int32 x)) + Int32 x -> x | _ -> invalid_arg "Pprz.int_assoc" let string_assoc = fun (a:string) (vs:values) -> string_of_value (assoc a vs) diff --git a/sw/lib/ocaml/pprz.mli b/sw/lib/ocaml/pprz.mli index 8621ea9129..f5acaaf160 100644 --- a/sw/lib/ocaml/pprz.mli +++ b/sw/lib/ocaml/pprz.mli @@ -63,7 +63,7 @@ val string_assoc : string -> values -> string val float_assoc : string -> values -> float val int_assoc : string -> values -> int -val int32_assoc : string -> values -> int +val int32_assoc : string -> values -> Int32.t (** May raise Not_found or Invalid_argument *) exception Unknown_msg_name of string * string