Prototype for extern symbols is always emitted
When declaring a symbol as extern
annotated with CCode(cheader_filename = ...)
there should be no prototype written.
This behaviour makes it also hard or even impossible to bind custom symbols, which might be missing in existing bindings, since prototypes must match each other.
[CCode (cname = "g_strdup", cheader_filename = "glib.h")]
extern string strdup (string s);
emits superfluous prototype
gchar* g_strdup (const gchar* s);
A related issue is that prototype for to_string
method for enum
symbol is emitted.
enum Foo {
BAR
}
void main () {
string s = Foo.BAR.to_string ();
}
const gchar* foo_to_string (Foo self);