Re: Can't call soup_cookie_parse() through GIR



On Sat, Dec 3, 2011 at 14:06, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 03.12.2011 12:46, Emmanuel Rodriguez wrote:

  HTTP::Soup::Cookie->parse($value, undef);
  HTTP::Soup::Cookie->parse($value, HTTP::Soup::URI->new('/'));

[...]


libsoup documentation says that soup_cookie_parse is a function and
that the URI parameter can be NULL. I don't understand where the
blessed reference is supposed to go.


Since it's a function, try

ÂHTTP::Soup::Cookie::parse($value, undef);
ÂHTTP::Soup::Cookie::parse($value, HTTP::Soup::URI->new('/'));
doh! I was so much use to all the functions like Glib::Timeout->add()
and Glit::Idle->add() that I assumed that it had to be called with a
package name.


The '->' causes the package name to be passed to the invoker which thus sees
$value where it expects the URI.
yep, it didn't occur to me that it had to be called as a simple
function without a package name as the first argument.

ÂYeah, our error messages need a lot of
improvements. ÂPatches welcome, of course.
Indeed. I'll try to help.


Thanks a lot.
-- 
Emmanuel Rodriguez



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