ocamlspot / xident.ml

Diff from to


   let binding_time = binding_time id in
   Name.create (name id) binding_time
-module Ident_internal : sig
-  val unsafe_create_with_stamp : ?flags: int -> string -> int -> Ident.t
-end= struct
-  (* Stamp is untouchable outside of ident.ml. A dirty
-     workaround *)
-  type t = { stamp: int; name: string; mutable flags: int }
-  let to_ident (id : t) = (Obj.magic id : Ident.t)
-  (* It is dangerous operation! *)        
-    let unsafe_create_with_stamp ?(flags=0) name stamp =
-      to_ident { stamp = stamp; name = name; flags = flags }
-let unsafe_create_with_stamp = Ident_internal.unsafe_create_with_stamp
+let create_with_stamp ?(flags=0) name stamp =
+  { stamp = stamp; name = name; flags = flags }
 let format ppf id = Format.pp_print_string ppf (name id)
 let parse s =
   let s, pos = Name.parse s in
-  let id = unsafe_create_with_stamp s pos in
+  let id = create_with_stamp s pos in
   (* CR jfuruse: actually 0 is global and should be printed as 'G'
      Current 'G' means -1 *)
   if pos = 0 then make_global id;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.