[python] no need to be python-compatible

Summary: Python doesn't need to read anything from infer anymore \ô/

Reviewed By: skcho

Differential Revision: D20672770

fbshipit-source-id: 8d277fb15
master
Jules Villard 5 years ago committed by Facebook GitHub Bot
parent 1b2829b352
commit b06170429c

@ -781,7 +781,7 @@ let to_filename pname =
| _ -> | _ ->
F.asprintf "%a" pp_unique_id pname F.asprintf "%a" pp_unique_id pname
in in
Escape.escape_filename @@ DB.append_crc_cutoff proc_id DB.append_crc_cutoff proc_id
module SQLite = struct module SQLite = struct

@ -100,18 +100,6 @@ let escape_path s =
escape_map map s escape_map map s
(* Python 2 sucks at utf8 so do not write unicode file names to disk
as Python may need to see them *)
let escape_filename s =
let map = function
| c when Char.to_int c > 127 ->
Some "?" (* non-ascii character: escape *)
| _ ->
None
in
escape_map map s
let escape_json s = escape_map (function '"' -> Some "\\\"" | '\\' -> Some "\\\\" | _ -> None) s let escape_json s = escape_map (function '"' -> Some "\\\"" | '\\' -> Some "\\\\" | _ -> None) s
let escape_double_quotes s = escape_map (function '"' -> Some "\\\"" | _ -> None) s let escape_double_quotes s = escape_map (function '"' -> Some "\\\"" | _ -> None) s

@ -20,9 +20,6 @@ val escape_xml : string -> string
val escape_url : string -> string val escape_url : string -> string
val escape_filename : string -> string
(** escape a string to be used as a file name *)
val escape_json : string -> string val escape_json : string -> string
(** escape characters in the string so it becomes a valid JSON string *) (** escape characters in the string so it becomes a valid JSON string *)

Loading…
Cancel
Save