[Vala] typeinfo of non-existent enum in vapi file
- From: Thomas Olson <tolson stratagium net>
- To: vala-list gnome org
- Subject: [Vala] typeinfo of non-existent enum in vapi file
- Date: Sat, 05 Oct 2013 06:19:30 -0500
Hello,
The sqlite3.vapi file defines the Sqlite.Action enum, which does not
really exist in the Sqlite souce code, so executing the following fails:
Type t = typeof(Sqlite.Action);
EnumClass k = (EnumClass)t.class_ref(); // doesn't get this far
The compiler error message is:
error: ‘SQLITE3_TYPE_ACTION’ undeclared (first use in this function)
Is there a way to create a vapi file so that Sqlite.Action would not be
considered an external define and instead considered a native Vala
declaration?
Instead of this:
[CCode (cname = "int", cprefix = "SQLITE_")]
public enum Action {
CREATE_INDEX,
CREATE_TABLE,
...
Something like this:
[CCode (cname = ""]
public enum Action {
[CCode (cname = "constant int", cprefix = "SQLITE_")]
CREATE_INDEX,
[CCode (cname = "constant int", cprefix = "SQLITE_")]
CREATE_TABLE,
...
Kind Regards,
Tom
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]