use Misc.protect_refs for Env.without_cmis

master
Jacques Garrigue 2016-08-24 05:29:22 +09:00 committed by David Allsopp
parent b276a078cd
commit e8881eefc6
1 changed files with 1 additions and 5 deletions

View File

@ -462,11 +462,7 @@ let read_pers_struct check modname filename =
let can_load_cmis = ref true
let without_cmis f x =
if !can_load_cmis then begin
can_load_cmis := false;
try let r = f x in can_load_cmis := true; r
with e -> can_load_cmis := true; raise e
end else f x
Misc.(protect_refs [R (can_load_cmis, false)] (fun () -> f x))
let find_pers_struct check name =
if name = "*predef*" then raise Not_found;