Browse thread
Re:_Interfaçage_C/CAML
- David McClain
[
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: | David McClain <dmcclain@a...> |
| Subject: | Re:_Interfaçage_C/CAML |
Many thanks for pointing this error out... I had inadvertantly used the
incorrect Store_... form twice on finalized structures in my bulk of code,
although I have never experienced any problems from it... But just to be
safe I read the message in the archives and went through by stuff to clean
it up...
- David
-----Original Message-----
From: David Mentré <David.Mentre@irisa.fr>
To: Markus Mottl <mottl@miss.wu-wien.ac.at>
Cc: Nicolas Joliot <Nicolas.Joliot@irisa.fr>; caml-list@inria.fr
<caml-list@inria.fr>
Date: Monday, August 14, 2000 9:49 AM
Subject: Re: Interfaçage C/CAML
>Markus Mottl <mottl@miss.wu-wien.ac.at> writes:
>
>> It seems that a common bug has struck again: using "Store_{whatever}" in
>> C-interfaces is only allowed (and then mandatory) with structured blocks.
>> Using it for anything else may crash the GC.
>
>I would say that Store_{whatever} macros are useful for data structures
>that are created in the C-world but should be managed (and destroyed) in
>the OCaml-world, WITHOUT any further access on the data by the C
>part. For all other cases, use the Field_{whatever} macros. With this
>macro, the OCaml GC won't try to have a look at your C data structures.
>
>By the way, Markus has already found a bug like this in my own code. See
>this message for further details on how the bug is triggered :
> http://caml.inria.fr/archives/200002/msg00074.html
>
>I hope it helps,
>d.
>--
> David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/
> Opinions expressed here are only mine.
>