On Sat, Jan 29, 2011 at 3:09 AM, Xyne <x...@archlinux.ca> wrote: > Allan McRae wrote: > >> The lazy initialisation means that nothing is actually loaded when >> registering the local database. The local database is only read in as >> needed and only the parts that are needed are read in. >> >> In fact, all that is done registering the local database is creating a >> pmdb_t srtuct and assigning the local database operation struct to it. >> That is the "little to no fallout" if you do not use the local database. >> >> Allan >> > > Thanks for the clarification. > > Even if it is negligible, it's munging separate logic together. Given that the > purpose is presumably to save coders a few lines of code, I still think it > would make more sense to use a wrapper function to do that when getting the > handle.
The "register" code could just as well be done in the handle setup where I moved the call anyway. You'd save about 13 CPU cycles. It's design that is meant to remove stupidity in a library where you have to make what seems like a no-op call- but make sure you only do it once. Why let users shoot themselves in the foot? We already handled the teardown in alpm_release so this just makes the initialize side map that. -Dan -Dan