Re: GValue won't init inside hidden functions





John Cupitt wrote:
Did you remember to initialise the GValue to {0}? The following
program runs with no warnings for me.
OK, I am guilty, as charged.   I failed to zero-fill the GValue structure
when I defined it (as a stack variable).  The documentation for GValue
states:

"To create a undefined GValue <http://developer.gnome.org/doc/API/2.0/gobject/gobject-Generic-values.html#GValue> structure, simply create a zero-filled GValue <http://developer.gnome.org/doc/API/2.0/gobject/gobject-Generic-values.html#GValue> structure."

I failed to interpret this as "you must zero-fill undefined GValue structures"

Thanks for you help.

Phil



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