From: Stephane Glondu Date: Thu, 20 Apr 2017 11:00:36 +0200 Subject: In GETTEXT, fix f_ to avoid call to Obj.magic Bug: https://bugs.launchpad.net/ocamlbricks/+bug/1684507 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860405 --- GETTEXT/gettext_builder.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GETTEXT/gettext_builder.ml b/GETTEXT/gettext_builder.ml index 4805e95..0741cb2 100644 --- a/GETTEXT/gettext_builder.ml +++ b/GETTEXT/gettext_builder.ml @@ -58,5 +58,7 @@ module Make (TheTextDomainAndDirectory : TextDomainAndDirectory) : Gettext = str (* Public versions for format strings, with the type we like: *) let f_ english_format_string = - (Obj.magic dgettext TheTextDomainAndDirectory.text_domain ((Obj.magic english_format_string) : string));; + let english_string = string_of_format english_format_string in + let foreign_string = dgettext TheTextDomainAndDirectory.text_domain english_string in + Scanf.format_from_string foreign_string english_format_string;; end;;