blob: 0a3be860abb9c7488523704adee1f5d3b0b3e702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
(***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU Library General Public License. *)
(* *)
(***********************************************************************)
(* $Id$ *)
(* Module [Obj]: operations on internal representations of values *)
(* Not for the casual user. *)
type t
external repr : 'a -> t = "%identity"
external obj : t -> 'a = "%identity"
external magic : 'a -> 'b = "%identity"
external is_block : t -> bool = "obj_is_block"
external is_int : t -> bool = "%obj_is_int"
external tag : t -> int = "obj_tag"
external size : t -> int = "%obj_size"
external field : t -> int -> t = "%obj_field"
external set_field : t -> int -> t -> unit = "%obj_set_field"
external new_block : int -> len:int -> t = "obj_block"
external dup : t -> t = "obj_dup"
external truncate : t -> len:int -> unit = "obj_truncate"
val no_scan_tag : int
val closure_tag : int
val infix_tag : int
val object_tag : int
val abstract_tag : int
val string_tag : int
val double_tag : int
val double_array_tag : int
val final_tag : int
(* The following two functions are deprecated. Use module [Marshal]
instead. *)
val marshal : t -> string
val unmarshal : string -> int -> t * int
|