moonpool/dev/ocaml/Stdlib/Oo/index.html
2023-08-28 17:11:38 +00:00

2 lines
No EOL
1.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Oo (ocaml.Stdlib.Oo)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../index.html">ocaml</a> &#x00BB; <a href="../index.html">Stdlib</a> &#x00BB; Oo</nav><header class="odoc-preamble"><h1>Module <code><span>Stdlib.Oo</span></code></h1><p>Operations on objects</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span><span class="keyword">val</span> copy : <span><span>&lt; .. &gt;</span> <span class="keyword">as</span> 'a <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>Oo.copy o</code> returns a copy of object <code>o</code>, that is a fresh object with the same methods and instance variables as <code>o</code>.</p></div></div><div class="odoc-spec"><div class="spec value external anchored" id="val-id"><a href="#val-id" class="anchor"></a><code><span><span class="keyword">val</span> id : <span><span>&lt; .. &gt;</span> <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>Return an integer identifying this object, unique for the current execution of the program. The generic comparison and hashing functions are based on this integer. When an object is obtained by unmarshaling, the id is refreshed, and thus different from the original object. As a consequence, the internal invariants of data structures such as hash table or sets containing objects are broken after unmarshaling the data structures.</p></div></div></div></body></html>