From bea823a1ea040eaf6eaf37fb073518587d11495a Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Thu, 4 Jun 2020 10:24:56 +0200 Subject: [PATCH] Reword what will happen with pointers outside the heap Following review comments. Also: fix the assertion in the third val_of_typtr function. --- manual/manual/cmds/intf-c.etex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/manual/cmds/intf-c.etex b/manual/manual/cmds/intf-c.etex index b7f654d3c..4323a89ff 100644 --- a/manual/manual/cmds/intf-c.etex +++ b/manual/manual/cmds/intf-c.etex @@ -478,7 +478,7 @@ floating-point numbers.} In earlier versions of OCaml, it was possible to use word-aligned pointers to addresses outside the heap as OCaml values, just by casting the pointer to type "value". Starting with OCaml -4.11, this usage is obsolete and will stop being supported soon. +4.11, this usage is deprecated and will stop being supported in OCaml 5.00. A correct way to manipulate pointers to out-of-heap blocks from OCaml is to store those pointers in OCaml blocks with tag @@ -526,7 +526,7 @@ integer. /* Create an OCaml value encapsulating the pointer p */ static value val_of_typtr(ty * p) { - assert ((uintptr_t) p & 1 == 0); /* check correct alignment */ + assert (((uintptr_t) p & 1) == 0); /* check correct alignment */ return (value) p | 1; }