Re: [Vala] Invalid assignment from owned expression to unowned variable
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Joseph Montanez <jmontanez gorilla3d com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Invalid assignment from owned expression to unowned variable
- Date: Fri, 15 Apr 2011 18:36:07 +0100
Hello,
On Thu, Apr 14, 2011 at 6:45 PM, Joseph Montanez
<jmontanez gorilla3d com> wrote:
I got it, I needed
public void dostuff (out unowned Soup.Message msg)
and then I could do:
dostuff(out msg);
No you shouldn't. You probably need to transfer ownership as in:
public void dostuff (out unowned Soup.Message msg) {
...
msg = (owned) ...;
}
btw, why using an out argument? If you need to return only one value,
it'd be easier to use a return value instead.
في ج، 15-04-2011 عند 10:18 -0700 ، كتب Joseph Montanez:
Actually when I access anything from "msg", it just segment faults :(
https://gist.github.com/922060
What's this? Why do you think you need 'out' here? You should simply
remove the 'out' keyword (and 'unowned' as well, since it would be
unowned by default).
HTH,
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]