Browse thread
Converting C arrays to Ocaml arrays
-
Chris Campbell
- Michael Wohlwend
-
Jonathan Roewen
- Jonathan Roewen
[
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: | 2006-04-11 (09:02) |
From: | Jonathan Roewen <jonathan.roewen@g...> |
Subject: | Re: [Caml-list] Converting C arrays to Ocaml arrays |
> I believe the array should already be null-terminated. Well, I asked around, and some people say it's not. So, instead, do: calloc(num+1), and then do: array[num] = NULL; and null-termination problem will be gone. And looking at caml_alloc_array, the most you'd prolly get is warning about pointer vs int. caml_alloc_array doesn't appear to depend on it being an actual pointer. Jonathan