Re: [Vala] problem with GNet Connhttpeventresponse

On Thu, Jan 22, 2009 at 11:20 PM, lariamat <interflug1 gmx net> wrote:
Hi Jezra
Also foreach is now working with recent vala for null-terminated arrays.
As you are just using and approving the gnet bindings you could post the
working vapi to the mailing list or attach it to a bugzilla report as
soon as everything is working.

Am Donnerstag, den 22.01.2009, 13:45 -0800 schrieb jezra:
On Wed, Jan 21, 2009 at 3:32 PM, lariamat <interflug1 gmx net> wrote:
[NoArrayLength] is outdated with current versions of vala.
It's [CCode (array_length = false)] now.
Am Mittwoch, den 21.01.2009, 23:52 +0100 schrieb Frederik:

Ok, then try putting [NoArrayLength] before each one of those array
fields in the vapi file. Since these are null terminated, they provide
no length information.



Having used lariamat's suggestion, my gnet-vapi was update to include
                [CCode (array_length = false)]
              public string[] header_fields;

I can now compile without error, but when I try to read the length of
the header_fields variable, I get a -1.
the code to read the length is
private void get_response_data(ConnHttpEventResponse resp)
                weak string[] header_fields;
              header_fields = resp.header_fields;
              //how many header fields are there?
              stdout.printf("%d header fields\n",header_fields.length);
curl -D confirms that the URL I'm using for testing is returning
headers, so  I'm presuming that this is either a problem with the gnet
library not getting the headers or a problem with copying string
arrays of unkown length or some sort of programmer error that I'm
overlooking. Any suggestions would be greatly appreciated.

Vala-list mailing list
Vala-list gnome org

Vala-list mailing list
Vala-list gnome org

attached is my working gnet-2.0.vapi that resolved the problem with
null terminating string array

Attachment: gnet-2.0.vapi
Description: Binary data

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