Version française
Home     About     Download     Resources     Contact us    
Browse thread
caml_hash_variant()
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
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