Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Question about register_global_root
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Maas-Maarten Zeeman <maas@w...>
Subject: Re: [Caml-list] Question about register_global_root
  Chris Hecker wrote:

>>  handlers = (value *) malloc(sizeof(value));
>>  register_global_root(handlers);
> Shouldn't you init *handlers to Val_unit before calling 
> register_global_root() as well?

The manual explicitly tells that register_global_root should be called 
before any valid value is stored in it for the first time, like 
Val_unit. See Rule 4 of Interfacing C with Objective Caml in the manual.

So I think it is ok the way it is implemented.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: