[CCode(simple_generics = true)] generates invalid C code
Submitted by Matthias Berndt
Link to original bug (#772209)
Description
Hey,
when declaring a function e. g. like this:
[CCode(simple_generics = true)]
extern GLib.HashTable<K, V> g_hash_table_ref<K, V>(GLib.HashTable<K, V> ht);
The generated C prototype will look like this:
GHashTable* g_hash_table_ref (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, GHashTable* ht);
But because of the simple_generics attribute, at the call site only a single argument (i. e. the hash table) will be passed. The resulting C code can not be compiled due to this.
Version: 0.32.x
Edited by Corentin Noël