Re: [Vala] Genie xmlrpc-c bindings test
- From: Phil Daintree <phil logicworks co nz>
- To: vala-list gnome org
- Subject: Re: [Vala] Genie xmlrpc-c bindings test
- Date: Sat, 18 Sep 2010 18:31:50 +1200
Pancake,
I am trying to get values from the xml-rpc call that returns a struct -
and have tried the struct_read_value and the struct_get_key_and_value
calls which seem to be exactly what I am after. However,
# valac --pkg=xmlrpc --Xcc=-lxmlrpc_client xmlrpc-c_test.gs
/tmp/ccQFcfAa.o: In function `print_value':
xmlrpc-c_test.vala.c:(.text+0x66f): undefined reference to
`xmlrpc_env_struct_read_value'
xmlrpc-c_test.vala.c:(.text+0x6f3): undefined reference to
`xmlrpc_env_struct_read_value'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
However, on inspection of the vapi I note:
/* struct */
// TODO: move into StructValue
Did you ever get around to this?
If not then it looks like xml-rpc-c ain't gonna do it for me :-(
I did manage to replicate your test program in genie ok - after Jan and
Evan's help - but if the values of the struct returned are not
obtainable then I am back to libxml to parse the output of the libsoup
xml-rpc call - which has also proven troublesome to this slow newbie to
vala/genie! It's a shame as this xml-rpc-c library appears to have all
the functions in it to do the job :-(
Perhaps I need to learn C to finish the job on these bindings and try to
give a bit back!
Phil
On 15/09/10 04:54, Jan Hudec wrote:
On Tue, Sep 14, 2010 at 20:00:58 +1200, Phil Daintree wrote:
Thanks for taking a look Evan
If that is the case, then adding
[CCode (ref_function_void = true)]
to the class should do the trick/
I see a lot of these sorts of lines in the XML-RPC-C bindings of
pancake's and since there is no class in my genie code, I guess you
mean this code should go in here somewhere? Or do you mean inside
the xml-rpc-c code and recompile the library?
I fear I am too wet behind the ears to figure out what to do with
that line. I've pasted pancake's xmlrpc.vapi file below - maybe the
line
[CCode (cprefix="xmlrpc_value_", cname = "xmlrpc_value",
ref_function="xmlrpc_INCREF", unref_function="xmlrpc_DECREF",
free_function="")]
has something to do with it?
It sure does. the ref_function_voidtrue should just be added to the argument
list. So change the line to:
[CCode (cprefix="xmlrpc_value_", cname = "xmlrpc_value", ref_function="xmlrpc_INCREF", ref_function_void=true,
unref_function="xmlrpc_DECREF", free_function="")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]