apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: Best practice: arrays of structures
Date Mon, 24 Jan 2005 14:55:00 GMT
Graham Leggett wrote:
> Hi all,
> 
> What is the best practice for handling arrays of structures? Do you define
> an array of pointers to structures, or just an array of structures? Or
> does it matter?

Depends whether its sparse. For spares, the latter solution is better.

> 
> In other words this:
> 
>     ps->dirconn = apr_array_make(p, 10, sizeof(struct dirconn_entry));
> 
> or this:
> 
>     ps->dirconn = apr_array_make(p, 10, sizeof(struct dirconn_entry *));
> 
> Regards,
> Graham
> --
> 
> 


-- 
http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Mime
View raw message