[Vala] Invalid assignment from owned expression to unowned variable

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);

But that results in "error: No reference to be transferred". Also
attempted switch out to ref and casting owned on it as well and still
the same results.

Joseph Montanez
Web Developer
Design, Develop, Deploy

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