Version française
Home     About     Download     Resources     Contact us    
Browse thread
Accessing constructors (tags) from C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Raj Bandyopadhyay <rajb@r...>
Subject: Accessing constructors (tags) from C
Hi all

I was wondering how to access constructors from C. For example if I 
define a type

type t = Null | Int of int

and I want to create values of type t in C using the OCaml-C interface, 
how do I find
the integers corresponding to constructors Null or Int? I would like to 
do this for a large OCaml program with lots of different types etc.

Thanks!
Raj