diff options
Diffstat (limited to 'stdlib/oo.mli')
-rw-r--r-- | stdlib/oo.mli | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/stdlib/oo.mli b/stdlib/oo.mli index cd83151bb8..508217228b 100644 --- a/stdlib/oo.mli +++ b/stdlib/oo.mli @@ -17,11 +17,17 @@ val copy : (< .. > as 'a) -> 'a (** [Oo.copy o] returns a copy of object [o], that is a fresh - object with the same methods and instance variables as [o] *) + object with the same methods and instance variables as [o]. *) external id : < .. > -> int = "%field1" (** Return an integer identifying this object, unique for - the current execution of the program. *) + 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. + *) (**/**) (** For internal use (CamlIDL) *) |