On Sun, Nov 22, 2009 at 05:32:36PM +0100, Michael 'Mickey' Lauer wrote:
> Hi Julian,
> 
> this looks mostly good, however please do not use
> [CCode (has_target = false)] unless the upstream API does not provide a
> user_data or client_data pointer. In the case of your delegates, it
> seems all provide such a client_data pointer, so rather use
> [CCode (instance_pos = ...)] for it, otherwise you would limit callbacks
> to being static only.

Any more exact ideas? All delegates take the Archive instance as their
first parameter and userdata as their second:
    public delegate off_t SkipCallback (Archive archive, void* client_data, 
off_t request);

Now, one method of Read (a sublcass of Archive) is:
    public Result open (void* client_data, OpenCallback ocb, ReadCallback rcb, 
CloseCallback ccb);
And "client_data" shall be passed to all callbacks.

I want have the delegate be:
    public delegate off_t SkipCallback (off_t request);
and the method:
    public Result open (OpenCallback ocb, ReadCallback rcb, CloseCallback ccb);

How should I do this?


-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to