Re: G_ARRAY_LENGTH for glib.h?



David Benson <daveb@idealab.com> writes:

> #define G_IS_STATIC_ARRAY(array)  ((void*)&(array) == (void*)&((array[0])))
> 
> is almost dangerously clever, but works I think....

AFAICT, this will always be true. Perhaps did you mean

 array == &array 

which will be true for static arrays ?

-- 
					Guillaume.
					http://www.telegraph-road.org



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