Re: why declare non-ptr and pass with &?

On Tue, Mar 05, 2002 at 08:29:54PM +0900, Kang Jeong-Hee wrote:

> in gtk-demo's tree_store.c source, each GtkTreeIter declared without *
> and passed with &.  

> IMHO this is out of order comparing other objects and widgets.  

> Is there specific reason why declare non-* and pass &?

I don't see a reason not to do it. In fact, it's less eror-prone than
allocating memory first. It should also allow the compiler to optimize
better. Pointers always complicate things but YMMV.

Bye, Tino.

             * LINUX - Where do you want to be tomorrow? *

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]