mrsolo__ has quit [Read error: 104 (Connection reset by peer)]
mrsolo__ has joined #ocaml
Slick18 has joined #ocaml
ellisonch has quit [Read error: 104 (Connection reset by peer)]
mrsolo__ has quit [Read error: 104 (Connection reset by peer)]
mrsolo__ has joined #ocaml
pango is now known as pangoafk
pangoafk is now known as pango
Skal has joined #ocaml
mikeX has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
skywire has joined #ocaml
ertai has quit ["leaving"]
Slick18 is now known as ellisonch
mikeX has quit ["leaving"]
ertai has joined #ocaml
<ulfdoz>
When I allocate a custom block via alloc_custom, do I still need to register it with the gc, or is it already registered?
<zmdkrbou>
you don't need more
<dylan>
But do remember to use CAMLparam and CAMLreturn with it. :)
<dylan>
(or, rather, whatever C-level variable that eventually contains it)
<ulfdoz>
C-Code looks quite good until now, but there are still ~80% of it todo.
<ulfdoz>
The things with side effects in ML-structures caused in C-World belong to them. :(
ski_ has joined #ocaml
ski has quit [Nick collision from services.]
ski_ is now known as ski
Smerdyakov has joined #ocaml
skylan_ has joined #ocaml
joshcryer has joined #ocaml
skylan has quit [Success]
<ulfdoz>
Is there a clean way to convert an value with an type 'a (polymorphic in ml) to a void pointer, which then can be safely accessed in c-world, so that there is a valid value at the target of the void pointer? Unfortunately there is no way to predict, what the void pointer is casted to.
<ulfdoz>
to illustrate it: in C - struct foo { void *bar } is represented in ocaml as type 'a foo { bar : 'a};; Now I need some translation for ml's foo.bar to C's foo->bar.
<fluxx>
I just represent C structs as 'type foo'
<fluxx>
so only C-code can construct or access them
<fluxx>
but I guess this is not what you're after?
<fluxx>
I suppose the type could just as well be 'a foo :)
<fluxx>
and then val get_foo : 'a foo -> 'a
mikeX has joined #ocaml
dark_light has quit ["Fui embora"]
mikeX has quit [Read error: 110 (Connection timed out)]
Revision17 has joined #ocaml
Schmurtz has joined #ocaml
ski_ has joined #ocaml
<ulfdoz>
fluxx: No it is data to exchange between the library and the programm. E.g. it could be a supplied username or a hash of a password. It can be necessary to modify this in the app.
<ulfdoz>
But currently gcc complains about caml__frame not being declared, and indeed, I can't find any declaration. It seems to be used by CAMLreturn.
ski has quit [Read error: 110 (Connection timed out)]
dylan has quit ["odin's CPU fan is broken..."]
<ulfdoz>
Hah! compiles. actually I haven't uses CAMLparamN, which seems necessary.