I am trying to bind libgda-3.0 (generation base attached to this mail). I have already worked around some naming conflicts via metadata. But for one thing I have no solution: In 'libgda/gda-data-model.h' there is this enum: typedef enum { GDA_DATA_MODEL_ACCESS_RANDOM = 1 << 0, GDA_DATA_MODEL_ACCESS_CURSOR_FORWARD = 1 << 1, GDA_DATA_MODEL_ACCESS_CURSOR_BACKWARD = 1 << 2, GDA_DATA_MODEL_ACCESS_INSERT = 1 << 3, GDA_DATA_MODEL_ACCESS_UPDATE = 1 << 4, GDA_DATA_MODEL_ACCESS_DELETE = 1 << 5, GDA_DATA_MODEL_ACCESS_WRITE = GDA_DATA_MODEL_ACCESS_INSERT | GDA_DATA_MODEL_ACCESS_UPDATE | GDA_DATA_MODEL_ACCESS_DELETE, } GdaDataModelAccessFlags; Now 'vala-gen-introspect' adds ACCESS_DELETE *twice* to the .gi file because of the line break after the '|' operator. I can work around that by manually removing the second one for now, but v-g-i should either be aware of this kind of line break or ignore duplicates. Running vapigen still produces errors: $ vapigen --library libgda-3.0 libgda-3.0/libgda-3.0.gi --vapidir=libgda-3.0 error: The type name `Xml.Node*' could not be found error: The type name `GLib.DateDMY' could not be found Xml.Node should be found, since I have added 'libxml-2.0' to the .deps file. What am I doing wrong? GLib.DateDMY seems to be missing in 'glib-2.0.vapi'. http://library.gnome.org/devel/glib/stable/glib-Date-and-Time-Functions.html#GDateDMY I have attached a patch for this one. Regards, Frederik
Index: vapi/glib-2.0.vapi =================================================================== --- vapi/glib-2.0.vapi (revision 2394) +++ vapi/glib-2.0.vapi (working copy) @@ -1656,6 +1656,13 @@ public bool valid (); } + [CCode (cprefix = "G_DATE_", has_type_id = false)] + public enum DateDMY { + DAY, + MONTH, + YEAR + } + public struct Date { public void clear (uint n_dates = 1); public void set_day (DateDay day);
Attachment:
libgda-3.0.tar.gz
Description: GNU Zip compressed data