Re: [Vala] VAPI: turning a function into a property?



On Sat, Dec 8, 2012 at 3:42 PM, foracc <foracc d00m info> wrote:

   [CCode (cheader_filename="allegro5/allegro5.h")]
   namespace Allegro5
   {
     [Compact]
     [CCode(cname="ALLEGRO_EVENT_**QUEUE",
            free_function="al_destroy_**event_queue")]
     class EventQueue {
       [CCode (cname="al_is_event_queue_**empty", instance_pos=0)]
       public bool empty { get; }
     }
   }


Try putting the CCode on the "get" rather than on the property:
public bool empty { [CCode (cname="al_is_event_queue_empty",
instance_pos=0)] get; }


Thanks, that did the trick.

Regards



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