Browse thread
Accessing constructors (tags) from C
- Raj Bandyopadhyay
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-11-23 (18:22) |
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