Re: Introspection



On Wed, 2005-01-12 at 01:06 +0100, Maciej Katafiasz wrote:
> Dnia 11-01-2005, wto o godzinie 22:34 +0000, Mike Hearn napisał:
> > On Tue, 11 Jan 2005 19:42:40 +0100, Maciej Katafiasz wrote:
> > > Anyway, I'm trying to fit that somehow into dynamic languages situation,
> > > and not sure, but it might be doable.
> > 
> > I think if you want this kind of true language swap/in out you want
> > something a bit different to GObject, eg something with compiler support.
> > I guess you could adapt GObject to suit with enough work but it's really
> > not designed for that.
> > 
> > The discussion seems to be motivated by reducing the work for bindings
> > authors and allowing auto-binding of objects at runtime (useful for less
> > popular libraries).
> 
> Yes, but I'm also trying to see how far we can push that without losing
> sanity ;). I guess swapping is no more in sane department, situation
> when C is all like "I can't believe it's not C" and Python is like "I
> can't believe it's not Python" should be enough.
> 

I think we should focus on making language bindings easier as the main
goal. 

So what is the actual problem with using

  metadata_symbol = g_strdup_printf ("_%s_METADATA", module_name);
  dlhandle = dlopen(NULL, RTLD_LAZY);
  metadata = dlsym(dlhandle, metadata_symbol);

to locate the binary metadata blow for C libraries ?
Robs prototype seems to use this method to locate the metadata blob. 
For dynamically loaded modules you would have to use a different
dlhandle, of course. And the metadata describing objects implemented
in a dynamic language would probably not come from a on-disk binary blob
at all, but be created at runtime.

Matthias





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]