<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ocaml.git/testsuite/tests/lib-obj/new_obj.reference, branch trunk</title>
<subtitle>github.com: ocaml/ocaml
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/'/>
<entry>
<title>Initialise in caml_obj_block / Obj.new_block only when necessary  (#9513)</title>
<updated>2020-05-02T16:47:16+00:00</updated>
<author>
<name>KC Sivaramakrishnan</name>
<email>kc@kcsrk.info</email>
</author>
<published>2020-05-02T16:47:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ocaml.git/commit/?id=9355b4e8f57fe19087046e67ef22113440608ad4'/>
<id>9355b4e8f57fe19087046e67ef22113440608ad4</id>
<content type='text'>
caml_alloc returns initialised blocks for tag &lt; No_scan_tag. Otherwise,
initialise the blocks as necessary.

For Abtract_tag, Double_tag and Double_array_tag, the initial contents
are irrelevant.

Uninitialised Custom_tag objects are difficult to use correctly. Hence,
reject custom block allocations through Obj.new_block.

For String_tag, the last byte encodes the string length. Hence, reject
zero-length string objects. Initialise the last byte which encodes the
length to ensure non-negative lengths for uninitialised strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
caml_alloc returns initialised blocks for tag &lt; No_scan_tag. Otherwise,
initialise the blocks as necessary.

For Abtract_tag, Double_tag and Double_array_tag, the initial contents
are irrelevant.

Uninitialised Custom_tag objects are difficult to use correctly. Hence,
reject custom block allocations through Obj.new_block.

For String_tag, the last byte encodes the string length. Hence, reject
zero-length string objects. Initialise the last byte which encodes the
length to ensure non-negative lengths for uninitialised strings.
</pre>
</div>
</content>
</entry>
</feed>
