[Vala] copy method in libsoup-2.4 vapi



Why does the copy method in libsoup-2.4 vapi returns a weak instance?
It returns a new copy of the URI structure. If the method returns a
weak instance because it doesn't increment its reference counting,
then the constructors should be weak too. Is it a bug o I'm just
utterly wrong?

If I'm wrong, how this snippet should be treated?

static calculate_uri (Soup.URI? baseURI)
{
   Soup.URI uri;

   if (baseURI != null)
   {
      uri = new Soup.URI ("http://live.gnome.org";);
   }
   else
   {
      uri = baseURI;
   }
}

vmjl



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