Hi Trond, On Fri, Aug 28, 2009 at 09:20:44AM +0200, Trond Norbye wrote: > Personally I don't like to expose the content of my structures through > the API, because it makes it harder to maintain binary compatibility. It > is easy to remember to update the library interface number when you add > / remove functions, but it is really easy to forget when you just add / > remove one member from a structure in an area it isn't obvious it would > impact the external interface ... If you want to pass in the memory > area, you should at least also pass along the size so the library can > check for the correct size...
I tend to prefer hiding the structs as well (and I did originally in libdrizzle) but Brian wanted the ability for client-side allocation. It does make sense for less/larger allocations, but binary upgrades are very difficult. You need to start doing fancy things with extending your structs (which means not being able to efficiently pack them) or just not supporting binary comaptibility for more upgrades. I see arguments for both, which is why I liked the interface for both. -Eric _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

