-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 14 August 2009, Ismael Luceno <[email protected]> wrote:
> El Fri, 14 Aug 2009 08:03:25 +0000
> Eric MSP Veith <[email protected]> escribió:
> <...>
>
> > > I don't think having an API for each db is a good idea...
> >
> > How many DBs do we have? We could just pass around the list head or
> > something, just like glib2 does with its list handling functions.
>
> active_db, states, ptypes, module_db, option_db, event_db, command_db,
> stypes.

Hm, wouldn't that just mean that the programmer who passes the function 
pointer has to take care that he handles the corresponding datatype 
accordingly, and we can just stick with a void* argument for the function 
pointer?

> > Btw, why don't we just do a static link to some parts of glib2, or
> > even carve them out from the source code? Perhaps code reuse
> > (theft :D) leads us on a faster way to something. Just a wild
> > suggestion.
>
> Glib2 functions are far less efficient. But that's not our current
> problem...

I didn't know they were not efficient; I always thought them to be quite 
elegant. Learn something new every day. :-)

> My main intention is to separate the functionality to be able to do
> major improvements and easily replace components.

When you create a set generic DB handling routines for adding/removeing 
stuff and iterating, the separation has already been done. I fear I don't 
understand your concerns, e.g., to begin with, what's bad about my API 
proposition. (Sure, it's been a quick one, but nevertheless...)

                -- Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqIdB0ACgkQhS0drJ3goJLXkQCfakGeE+MCO4YnvR5LB3tNFDCx
1GsAnjSoUmONdHQ88OAyG6nOxQthBBQ6
=ifQn
-----END PGP SIGNATURE-----
--
_______________________________________________
Initng mailing list
[email protected]
http://jw.dyndns.org/mailman/listinfo/initng

Reply via email to