[Vala] GNet bindings update



Hi all,

another revision of my patch to vapigen for the gnet bindings
generation.

I've changed the approach a little bit and I think that is better:

1) In the metadata file you can define a type as an alias of another
type with the <alias_of> attribute. So now we have

GnetTcp alias_of="GTcpSocket" function_prefix="socket_"

instead of

GnetTcp name="TcpSocket"

I think that this is more consistent because either type names refer to
the Gnet library and not one to gnet (GnetTcp) and the other to the vala
binding (TcpSocket).

2) You can override what vapigen thinks is the class that a method
belongs to with the new attribute <class_name>:

GnetConnHttp alias_of="GConnHttp" function_prefix="http_"
gnet_conn_hhtp_* class_name="GnetConnHttp"

Have a nice day,
Andrea

P.S.
I also cleaned the patch from unwanted spaces and debug code.

Attachment: gnet-2.0-binding-alias.patch
Description: Text Data

Attachment: gnet-2.0.vala
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]