Module system: last call for objections

Derek Atkins warlord@MIT.EDU
02 Aug 2001 10:40:12 -0400


grib@billgribble.com (Bill Gribble) writes:

> A gnucash module is a dynamically loadable libtool library that
> defines the following symbols:
> 
>     /* what version of the module system interface is assumed */
>     int  gnc_module_system_interface;
> 
>     /* information about the module's version */ 
>     int  gnc_module_current;
>     int  gnc_module_revision;
>     int  gnc_module_age; 
> 
>     /* init is called the first time the module is loaded */
>     int  gnc_module_init(void)
>      
>     /* on_load is called every time the module is loaded */
>     void gnc_module_on_load(void);

Any reason you can't just make this:
	void gnc_module_init(int refcount);

Also, are you sure you want this to be a void?  What if there is an
error during the module load/initialization process?

>     /* on_unload is called every time the module is unloaded */ 
>     void gnc_module_on_unload(void);
> 
>     /* on_finish is called when the last reference is unloaded */    
>     void gnc_module_finish(void)  

Similarly here:
	void gnc_module_end(int refcount);


[snip]

> What are the licensing issues?
> ------------------------------
> 
> This is probably up for debate, and i'm no expert, but I am working
> under the strongest GPL assumption: any gnucash plugin/module is a
> derivative work of Gnucash, even if distributed separately.  Therefore
> any module that is distributed must be distributed under the GPL.

Not to start a flamewar, but even RMS grudgingly admits that you can
have non-GPL code that interacts with a public GPL'ed interface.  Not
that we want to encourage such behavior, but it may stifle _some_
development.  For example, RMS agrees that OpenSSL (even though it is
NOT GPL) is ok to link in a GPL'ed program.  Also, Linus Torvalds
"allows" non-GPLed modules to be linked into the Linux kernel, too.

Anyways, just something to think about.

[snip]

The rest looks really good!

-derek
-- 
       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