RE: GLIB Hash Data



> > 
> > They need to be:
> > 
> >     guint     HashFunction (gconstpointer key);
> >     gboolean  HashCompare  (gconstpointer a, gconstpointer b);
> Ahh
> 
> 
> I was following the example in the book.  I see, but isn't gboolean
> #DEFINED as an int?  There is no BOOL in C.

The more important thing is the difference between "gpointer" and
"gconstpointer" in the parameters to your functions.

I had the same difficulty at first, until I re-examined the documentation
very closely.  (I actually had to look it up three times before the subtle
difference caught my eye.)

Hope this helps.



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