List Info

Thread: Re: "ocaml_beginners"::[] Re: multiple callbacks




Re: "ocaml_beginners"::[] Re: multiple callbacks
country flaguser name
Germany
2007-09-21 16:22:07
Am Freitag 21 September 2007 22:25:00 schrieb Florent
Monnier:

>   register_sample_file_type("mp3", load_mp3,
NULL);
>   register_sample_file_type("ogg", load_ogg,
NULL);

I see, you lose the information which registered function to
call on the 
c-side. What is the NULL parameter used for?

Michael


Archives up to November 11, 2006 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/

The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http:/
/groups.yahoo.com/group/ocaml_beginners/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    ht
tp://groups.yahoo.com/group/ocaml_beginners/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:ocaml_beginners-digest@yahoogroups.com 
    mailto:ocaml_beginners-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    ocaml_beginners-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

Re: "ocaml_beginners"::[] Re: multiple callbacks
country flaguser name
France
2007-09-21 19:00:41
> >   register_sample_file_type("mp3",
load_mp3, NULL);
> >   register_sample_file_type("ogg",
load_ogg, NULL);
>
> I see, you lose the information which registered
function to call on the
> c-side. What is the NULL parameter used for?

guess what? it's a second callback, lol 
the first is to load from the new file type and the second
to save to this 
file type, but it's possible to give Null if it's not used.

Well, if no one knows how to do on this list, maybe I should
ask on the other 
main ocaml list.


Archives up to November 11, 2006 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/

The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http:/
/groups.yahoo.com/group/ocaml_beginners/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    ht
tp://groups.yahoo.com/group/ocaml_beginners/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:ocaml_beginners-digest@yahoogroups.com 
    mailto:ocaml_beginners-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    ocaml_beginners-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

Re: "ocaml_beginners"::[] Re: multiple callbacks
country flaguser name
France
2007-09-21 19:07:19
> I see, you lose the information which registered
function to call on the
> c-side.

Yes indeed, as we can't know how many times the user will
call the function, 
the only solution I see is to make only one C callback that
is given each 
times as the callback parameter, so the trick is to make
this callback 
retrieve the proper caml function, that have been stored in
a list or a 
hash-table or whatever, so the point is indeed to know *how*
could we achive 
this task of retrieving the proper ml callback?

-- 
Regards


Archives up to November 11, 2006 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/

The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http:/
/groups.yahoo.com/group/ocaml_beginners/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    ht
tp://groups.yahoo.com/group/ocaml_beginners/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:ocaml_beginners-digest@yahoogroups.com 
    mailto:ocaml_beginners-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    ocaml_beginners-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )