English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-09-30 (20:25)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] caml_hash_variant()
From: Paul Argentoff <argentoff@rtelekom.ru>

> What caml_hash_variant() can be used for?

Well, what do you want to use it for?
It lets you retrieve the 31-bit representation used for a poymorphic
variant or method tag. This is useful if you want to access
polymorphic variants or objects from your C code.
Note that this hashing function is fixed, so depending on your
performence requirements you might want to compute the hashed values
before compilation, and completely drop the string representation.

Jacques Garrigue