Re: [Vala] Defining a new type



Hey - i think this is a problem with glib-2.0.vapi. If you read the
class definition, then i think, there must be a problem.

public class HashTable<K,V> {
        [CCode (cname = "g_hash_table_new_full", simple_generics = true)]
        public HashTable (HashFunc<K>? hash_func, EqualFunc<K>?
key_equal_func);
        public HashTable.full (HashFunc<K>? hash_func, EqualFunc<K>?
key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify?
value_destroy_func);

The CCode cname definition describe a cname for both constructor
functions. I think, the simple constructor should use g_hash_table_new
as cname.

-- 
Günther Wutz

Student der University of Applied Science
Allgemeine Informatik


Am Sonntag, den 22.04.2012, 20:10 +0200 schrieb Dennis Möhlmann:
class LexerDefinition: HashTable<string, LexerNode>  {

        [CCode (has_construct_function = false)]        // ??
        public LexerDefinition() {
                base(str_hash, str_equal);
        }
}




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