Re: [Mesa-dev] [RFC] Moving from macro to inline for list manipulation

2011-03-29 Thread Keith Whitwell
On Mon, 2011-03-28 at 17:54 -0400, Jerome Glisse wrote: > Hi, > > One short coming of macro has keep entertaining me until i figure out > what was wrong, here is > a simple scenario : > > Macro can lead to hard to debug list bugs. For instance consider > the following : > LIST_ADD(item, list->pre

Re: [Mesa-dev] [RFC] Moving from macro to inline for list manipulation

2011-03-29 Thread Keith Whitwell
On Mon, 2011-03-28 at 17:54 -0400, Jerome Glisse wrote: > Hi, > > One short coming of macro has keep entertaining me until i figure out > what was wrong, here is > a simple scenario : > > Macro can lead to hard to debug list bugs. For instance consider > the following : > LIST_ADD(item, list->pre

[Mesa-dev] [RFC] Moving from macro to inline for list manipulation

2011-03-28 Thread Jerome Glisse
Hi, One short coming of macro has keep entertaining me until i figure out what was wrong, here is a simple scenario : Macro can lead to hard to debug list bugs. For instance consider the following : LIST_ADD(item, list->prev) 3 instruction of the macro became : (list->prev)->next->prev = item whi