English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
question about caml_get_public_method
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-21 (07:15)
From: Michael Wohlwend <micha-1@f...>
Subject: question about caml_get_public_method
if I want to connect a c++ method to a method of an ocaml class, I can choose between:
a) in the initializer of the ocaml class use register_value to register a method (like self#some_method) and then calling an external function which caches the registered value and calls that method


b) calling an external function with the ocaml object as argument and then  use caml_get_public_method, cache the method-id of the callback methods and use those to make the callback.

Is this just a matter of taste which one to use?


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer