plugin/module architecture proposal for gnucash-1.7

Derek Atkins warlord@MIT.EDU
13 Jun 2001 09:13:06 -0400


dlopen() can keep symbols separated when loaded from a module.  You
can basically do something like:

	module = dlopen (module_name);
	module_sym = dlsym (module, "module_interface_table");

You can take a look in gnc-book (I think that's where this is) to see
how this is currently done for the backend modules.

-derek

Kevin Finn <kevinfinn@mediaone.net> writes:

> Bill Gribble wrote:
> > >  - Will each module provide its own g-wrappers, I assume?  Maybe there
> > > needs to be a mechanism or a policy to avoid collisions in that
> > > namespace.
> > 
> > That was actually one of my motivations :) The gigantic "gnc.gwp" file
> > bugs me because of its unweildyness and unmaintainability.  Lots of
> > smaller g-wrap files will make it easier to work more towards complete
> > coverage of the relevant APIs.
> > 
> > I'm not sure where namespace collisions would be a problem here.  Do
> > you have an example problem case?
> 
>      Maybe I do, and maybe I don't.  The guile namespaces will be local
> to the modules, but I could see how you would have C functions in the
> C-side modules which conflict between modules.  Unless there's something
> in dlopen(), etc. that handles this - I'm not too familiar with that. 
> Although I guess this wouldn't necessarily be a problem restricted to
> the g-wrap interfaces anyway; maybe just a consistent module naming
> scheme would be enough?  
> 
> -- 
> 
> Kevin Finn
> kevinfinn@mediaone.net
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel@lists.gnumatic.com
> http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available