Module system: last call for objections
Derek Atkins
warlord@MIT.EDU
02 Aug 2001 10:59:00 -0400
grib@billgribble.com (Bill Gribble) writes:
> > Any reason you can't just make this:
> > void gnc_module_init(int refcount);
>
> That makes sense; I'll make the change. It should return 'int' though.
Indeed. My bad, there. I was copying from 'on_load()' instead of
'init()'. Yes, it should return int. :)
> ATM I assume that if you can load it the first time (gnc_module_init
> returns TRUE) you can run the on_load in subsequent times, but that
> doesn't really follow, does it?
That's sort of what I thought.
> > Similarly here:
> > void gnc_module_end(int refcount);
>
> I agree with this too. The main thing is to be sure it's clear
> whether the refcount is pre- or post-{load,unload}.
Good question. Part of me feels that the ref-count should be
post-{load,unload} in all cases, but I'm not sure about that. Another
part of me things it should be pre-load and post-unload, but that can
get confusing, too.
Question: is it possible for the 'end()' function to fail?
> b.g.
-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