[Vala] Warning or Bug ?



Does anybody know why the following snippet produces a warning:

//----------------

// Struct to hold key, values pairs:

 struct pair {
     public int    freq;
     public string word;
 }


 // Equality function for structs :

 bool equals (pair a, pair b) {
     return (Posix.strcmp(a.word, b.word) == 0);
 }


 //List:

 var L = new LinkedList<pair?>( (EqualFunc) equals);

//----------------


Obviously the linked list instantiation does not like my equality
assessment function, but why ?


Serge.



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