On Mon, Aug 31, 2009 at 5:36 PM, Eric Day <[email protected]> wrote:

> Hi everyone!
>
> Ross and I have had a very thorough thread going on about libdrizzle
> and some questions have come out of it. Here are a couple decisions
> we would like feedback on:
>
>
> libdrizzle will optionally allocate memory for your objects if you
> do not. For example, you can do:
>
> /* User allocated. */
> drizzle_st drizzle;
> drizzle_create(&drizzle);
>
> or:
>
> /* libdrizzle allocated */
> drizzle_st *drizzle;
> drizzle= drizzle_create(NULL)
>
> What do folks think about this interface? Would having two functions
> be preferable to just one? For example:
>
> drizzle_st drizzle;
> drizzle_init(&drizzle)?
>
> and:
>
> drizzle_st *drizzle;
> drizzle= drizzle_new(void); /* Calls malloc() and drizzle_init() */
>

 Have you given thought to the alternative of making drizzle_st a opaque
type? and adding the ability to pass allocators..
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to