Hi, as promised here are the patches to vapigen & friends. I've break them for an easier reading and must be applied in sequence (svn rev. 602) 1) gnet-2.0-bindings-1.patch Add the ability to emit cname parameter in the CCode attribute to classes. This feature will be used by the other patches. 2) gnet-2.0-bindings-2.patch It solves the problem of multiple types with a similar cprefix and provides an attribute to force a user defined type name. For example in gnet (see gnet-2.0.gidl) we have a lot of objects that are called with two different cprefix G *and* Gnet (eg. GTcpSocket vs GnetTcp) and vapigen get confused by the GnetTcp name so that the resulting type name in the vapi file is netTcp (wrong) because it select the *G* cprefix. Even if vapigen would select the right namespace (Gnet) the resulting typename Tcp will be also wrong because the correct one is TcpSocket so the need of the "custom" name attribute. 3) gnet-2.0-bindings-3.patch The previous patch solves the problem that GnetTcp and GTcpSocket are the same class (TcpSocket), but it opens another one. What to do if GnetTcp contains function names like this: gnet_tcp_socket_get_remote_inetaddr in the GnetTcp struct? Vapigen will emit a class/method like these TcpSocket socket_get_remote_inetaddr. So I've introduced a concept similar to fix_type_name and a new attributes "function_prefix". I've also added the "delete" function name to the free_function checks and vapigen set the cname of the class if the symbol differs from the default class name. 4) gnet-2.0-bindings-4.patch These are gnet-2.0.metadata and gnet-2.0-custom.vala files. Will these patches break everything else? Yes and no I've tried to generate the gtk+ bindings and the third patch break just the name of CacheInfo object and nothing more (I don't know why...) I don't know if it fine to post everything here or it's better to open a bug in bugzilla so feel free to tell me. Bye, Andrea
Attachment:
gnet-2.0-bindings-1.patch
Description: Text Data
Attachment:
gnet-2.0-bindings-2.patch
Description: Text Data
Attachment:
gnet-2.0-bindings-3.patch
Description: Text Data
Attachment:
gnet-2.0-bindings-4.patch
Description: Text Data
Attachment:
gnet-2.0.vala
Description: Text Data