diff options
| author | Damien Doligez <damien.doligez-inria.fr> | 2014-03-31 17:58:53 +0000 |
|---|---|---|
| committer | Damien Doligez <damien.doligez-inria.fr> | 2014-03-31 17:58:53 +0000 |
| commit | 8643356b8542e0dcab358716f1e04d47b08b1a6d (patch) | |
| tree | e10cc5a03f7ead69a2d4ed563cbd021df5770ef2 /stdlib/camlinternalMod.ml | |
| parent | cd1bf4b9fc898cee2f4886ed18ddf6271ec522e8 (diff) | |
| parent | 989ac0b2635443b9c0f183ee6343b663c854f4ea (diff) | |
| download | ocaml-ephemeron.tar.gz | |
merge with trunk at rev 14512ephemeron
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ephemeron@14514 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/camlinternalMod.ml')
| -rw-r--r-- | stdlib/camlinternalMod.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stdlib/camlinternalMod.ml b/stdlib/camlinternalMod.ml index 20a65207f0..5f1882a2b4 100644 --- a/stdlib/camlinternalMod.ml +++ b/stdlib/camlinternalMod.ml @@ -16,6 +16,7 @@ type shape = | Lazy | Class | Module of shape array + | Value of Obj.t let rec init_mod loc shape = match shape with @@ -32,6 +33,8 @@ let rec init_mod loc shape = Obj.repr (CamlinternalOO.dummy_class loc) | Module comps -> Obj.repr (Array.map (init_mod loc) comps) + | Value v -> + v let overwrite o n = assert (Obj.size o >= Obj.size n); @@ -64,3 +67,5 @@ let rec update_mod shape o n = for i = 0 to Array.length comps - 1 do update_mod comps.(i) (Obj.field o i) (Obj.field n i) done + | Value v -> + overwrite o n |
