Hello, 2011/7/11 Serge Hulne <serge.hu...@gmail.com>: > If one has a look at the C code generated by Vala for the following > two examples, it appears that the "unowned" keyword has no influence > on the way > the string b (of type gchar*) is passed to f(). > > In both cases, it is passed as a pointer (without duplication). > > Therefore it seems to me that the Vala tutorial is slightly misleading > and should read: > > > - "In Vala strings are always passed by address".
A string in Vala is a *reference* type [1] and therefore passed by reference. The documentation is correct here, it may just need to point out clearly that fact. HTH, Abderrahim [1] it is a bit special because it is immutable, and thus copied whenever there is a new strong reference to it _______________________________________________ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list