Version française
Home     About     Download     Resources     Contact us    
Browse thread
Wrapping OCaml function returning a variant
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] Wrapping OCaml function returning a variant
One last question which I couldn't answer by browsing through  
mltypes.h...

What is the type of a on the C side?

	Thanks, Joel

On Mar 28, 2007, at 1:25 PM, micha wrote:

> the labels are numbered starting from zero, so in c have have to
> decode two possible values :
>
> let a= Success("xxx") ...
>
> is in C a block with tag 0 and size 1, to get the string write:
>
> char* s = String_val(Field(a,0))

--
http://wagerlabs.com/