That wound up working -- kind of. I had to use lower_case_cprefix="gmime_" for it to generate the right type conversion macro. My big fear, as you mentioned, was then having to go back and patch up every method with the right cname. It turns out that vapigen magically saw the problem and provided the proper cname, saving me a bunch of work.
-- Jim On Tue, Jul 5, 2011 at 12:03 AM, Luca Bruno <[email protected]> wrote: > On Mon, Jul 04, 2011 at 08:16:28PM -0700, Jim Nelson wrote: > > Hello, > > > > I'm attempting to build a VAPI for GMime. (If anyone can point me to a > > completed version, it would be appreciated!) > > > > The problem I'm running into is this: > > > > The namespace for the module is GMime. The class GMimeStream's type > > conversion macro is GMIME_STREAM but valac auto-generates it as > > G_MIME_STREAM, leading to compilation errors. I've been unable to find a > > way via the .metadata file to coerce valac to use the proper macro. The > > type_id field seems to be for the GType of the class (GMIME_TYPE_STREAM) > and > > the other fields don't help here either. > > > > In C, the problem is when an instance of a subclass of GMimeStream is > being > > passed to a function that expects a GMimeStream: > > > > g_mime_stream_cat_add_source (stream_cat, G_MIME_STREAM (_tmp14_)); > > > > I need valac to use GMIME_STREAM instead. > > > > I'm sure this is something simple, but it's escaping me right now. > > Well that's a weird api unfortunately. I fear the only thing you can do is: > GMime lower_case_cprefix="gmime" > But then you have to add cname to all other methods and so on. > > -- > http://www.debian.org - The Universal Operating System >
_______________________________________________ vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
