Re: [Vala] [PATCH] Add libarchive bindings.
- From: Julian Andres Klode <jak jak-linux org>
- To: Michael 'Mickey' Lauer <mickey vanille-media de>
- Cc: vala-list gnome org
- Subject: Re: [Vala] [PATCH] Add libarchive bindings.
- Date: Sun, 22 Nov 2009 18:37:36 +0100
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/.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]