Re: [Vala] Getting Vala not to give a GValue pointer to a function?



Hello,

On Fri, Mar 12, 2010 at 7:51 PM, Abderrahim Kitouni <a kitouni gmail com> wrote:
Hi,

2010/3/12, Faheem Pervez <trippin1 gmail com>:
Hiya,

 Vala n00b here, so be nice, please.
Don't be afraid, we're don't eat noobs ;-p


*Relieved sigh* - glad to hear it! :D

 The function http://maemo.org/api_refs/5.0/5.0-final/mafw/mafw-MafwMetadata.html#mafw-metadata-first
 returns a GValue when given a a GHashTable and a string. That's all
 well and good, except Vala also tries to give it a pointer to a GValue
 as the third argument. As you can see, it only takes two arguments.

 The relevant part of mafw.vapi looks like:
        [CCode (cheader_filename = "libmafw/mafw.h")]
        public static unowned GLib.Value metadata_first (GLib.HashTable md,
 string key);
It should return "GLib.Value?" instead.
Since bindings are automatically generated, sometimes they need to be
fixed manually.


Worked a treat. Thank you!

Best Regards,
Faheem



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