[
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: | -- (:) |
| From: | Thomas Fischbacher <Thomas.Fischbacher@P...> |
| Subject: | Re: [Caml-list] C interface style question |
On Thu, 19 Jan 2006, Damien Doligez wrote: > > StoreField(v,n,(value)(void*)p); > > This is the only way. Always use Store_field, Store_double_field, > and Store_double_val. One more question about this: can I interface a C function in such a way that it uses an OCaml float array to store its output data, i.e. pass &(Double_field(ml_output,0)) as a double* "output parameter"? Of course, I could always go through a bigarray, or use intermediate storage. But is there a direct way to do this? -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)