[Mesa-dev] [PATCH 1/3] mesa: add set support (stores a set of pointers)

Justen, Jordan L jordan.l.justen at intel.com
Wed Dec 5 15:28:28 PST 2012


On Wed, 2012-12-05 at 11:26 -0800, Ian Romanick wrote:
> On 12/05/2012 07:32 AM, Brian Paul wrote:
> > On 12/04/2012 04:55 PM, Jordan Justen wrote:
> >> +/**
> >> + * This function is an iterator over the hash table.
> >> + *
> >> + * Pass in NULL for the first entry, as in the start of a for loop.
> >> Note that
> >> + * an iteration over the table is O(table_size) not O(entries).
> >> + */
> >> +struct set_entry *
> >> +_mesa_set_next_entry(struct set *ht, struct set_entry *entry)
> >
> > Should ht be const-qualified here too?
> 
> Since the returned set_entry isn't const-qualified, probably not.  I 
> think the compiler will generate an error.

I added const to ht, and it is still building for me. (GCC 4.7)

I plan to push this series with Brian's feedback. Or, do
you suspect different compilers might take issue with it?

-Jordan




More information about the mesa-dev mailing list