[Vala] how to pass a List by reference?
- From: bsquared <bwcode4u gmail com>
- To: vala-list gnome org
- Subject: [Vala] how to pass a List by reference?
- Date: Thu, 13 Oct 2011 14:02:18 -0700
I am guessing that I'm going about this wrong, but I want to populate a list
from a static method.
static void populate_list (ref SList<string> list) {
list.append("");
}
I am getting a compiler error:
error: Cannot capture reference or output parameter
I want the ownership of the list to belong to the calling method.
What am I doing wrong?
--
Regards,
Brian Winfrey
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]