[ocaml] dirty fix to avoid segfault of server and GCS

This commit is contained in:
Gautier Hattenberger
2014-10-21 13:58:37 +02:00
parent 9328805b54
commit 855ac9d4fb
+7 -1
View File
@@ -167,6 +167,12 @@ let rec string_of_value = function
let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format)
(* FIXME temporary solution, the complete formatted_string_of_value function
causes a segfault in server and GCS *)
let string_of_value_format = fun format v ->
match v with
Float x -> sprintf (magic format) x
| v -> string_of_value v
let rec formatted_string_of_value = fun format v ->
match v with
@@ -717,7 +723,7 @@ module MessagesOfXml(Class:CLASS_Xml) = struct
try List.assoc field_name values with
Not_found ->
default_value field._type in
formatted_string_of_value field.fformat v)
string_of_value_format field.fformat v)
msg.fields)
let message_send = fun ?timestamp ?link_id sender msg_name values ->