Re: Can't call soup_cookie_parse() through GIR



On 03.12.2011 15:00, Emmanuel Rodriguez wrote:
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.

Yeah, it's somewhat of a design departure from the way we usually wrapped non-method functions in the past. There was a long and heated discussion on the list about this a few years ago. I can see reasons for either way of mapping these kinds of functions (with '->', i.e. class-static methods, or with '::', i.e. namespaced functions), but for G:O:I it felt naturally to use namespaced functions.

This is not set it stone yet, though. So if anyone sees good reasons to prefer the '->' route, now is the time to present them.



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