On Tue, 2009-01-20 at 14:39 +0100, Frederik wrote:
> How did you bind 'libsql/sql_parser.h'? It has unions and stuff. :(

The internals in v4 have changed significantly. I didn't check into the
unions generation, but these do not seem to exist anymore. It's a bit
odd. I get an error for v3:

/usr/include/libgda-3.0/libsql/sql_parser.h:122: syntax error, unexpected 
typedef-name, expecting identifier or '('
/usr/include/libgda-3.0/libsql/sql_parser.h:297: syntax error, unexpected 
typedef-name, expecting ')'
/usr/include/libgda-3.0/libsql/sql_parser.h:298: syntax error, unexpected 
typedef-name, expecting ')'
/usr/include/libgda-3.0/libsql/sql_parser.h:298: syntax error, unexpected ')', 
expecting ',' or ';'

While in v4 I get:

public class MetaDbObject {
        public void* extra;
}

<struct name="GdaMetaDbObject">
        <field name="extra" type="gpointer"/>
</struct>

for:
typedef struct {
        union {
                GdaMetaTable    meta_table;
                GdaMetaView     meta_view;
        }                       extra;
} GdaMetaDbObject;

Will give it another try with the g-ir-scanner this evening. Also need
updated system from svn.

> Right now, I have only stubs for the classes.
> 
> >> 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?
> > 
> > In v4 I had to do:
> > sed -i 's/xmlNodePtr/xmlNode*/g' libgda-4.0.gi
> 
> Generation succeeded - 0 warning(s)
> 
> :) Thanks. But this should be doable with metadata. I have tried
> 
>  xmlNodePtr name="Xml.Node*"
> 
> but it didn't work.

I think the new g-ir-* supports something like aliases. I'm not aware
vapigen does.

Hans


_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to