Re: [Vala] Invalid assignment from owned expression to unowned variable



Hello,

                 في خ، 14-04-2011 عند 07:58 -0700 ، كتب Joseph Montanez:
I am trying to pass Soup.Message msg as a reference to another
function but I end up getting   "Invalid assignment from owned
expression to unowned variable". I tried

void default_handlertwo (Soup.Server server, Soup.Message msg, string path,
                          GLib.HashTable? query, Soup.ClientContext client)

public void dostuff (out Soup.Message msg)

//and then
dostuff(out msg);

//I tried casting (owned) on it as well
dostuff((owned) msg);

Are you sure the problem is here? I'd guess the problem is when you
assign the result to msg in the dostuff method. Can you try putting the
(owned) cast there?

HTH,
Abderrahim




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