Eric Day wrote: > Hi Davi, > > On Tue, Sep 01, 2009 at 01:58:51PM -0300, Davi Arnaut wrote: >> Have you given thought to the alternative of making drizzle_st a opaque >> type? and adding the ability to pass allocators.. > > Originally, all the structures were opaque types for better binary > compatibility and I was going to rely on normal allocation or linking > with better allocators. A few folks really wanted to be able to have > stack allocated objects (without using alloca()) or objects allocated > with higher level structs. This is when they were exposed. Personally > I'm a fan of keeping them opaque. > > As far as custom allocators, there was going to be support for > custom allocators in some of the result set processing, but I was > not thinking about the actual objects. This makes a lot more sense > if we make everything opaque. > > I think because of folks wanting to use simple stack allocated objects > we won't be able to switch to opaque structs, but I do like the idea > you propose.
You know ... at the moment I think we've only got theoretical "folks" who might want to use stack allocated structs. What if we just say no? Is it _really_ an important thing to allow? You can still reuse your one allocated object - I can't imagine the cost of _one_ malloc would kill anyone. I vote for making them opaque unless someone actually has an actual reason for doing otherwise. Monty _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

