On Tue, Dec 01, 2009 at 19:03:41 +0100, Jan-Jaap van der Geer wrote:
> On Tue, 2009-12-01 at 08:21 +0100, pHilipp Zabel wrote:
> > On Tue, Dec 1, 2009 at 12:59 AM, Jan-Jaap van der Geer
> > <[email protected]> wrote:
> > > On Mon, 2009-11-30 at 15:09 -0800, Evan Nemerson wrote:
> > >> On Mon, 2009-11-30 at 23:45 +0100, pHilipp Zabel wrote:
>
> > >> > If errmess is null-terminated and utf-8 encoded, you could wrap it as
> > >> > a weak string.
>
> > > Why weak?
>
> > Because otherwise vala will try to call error_destroy () to have it
> > free the errmess string:
>
> [snip vala & generated c-code]
>
> Yes, I understand that it should not call error_destroy(), but my
> solution was to make it unowned, while you suggested making it weak. I
> would not be surprised if both work, I know unowned works. But what is
> preferred in this case?
They are equivalent for the time being. I believe unowned is really correct
as weak is planned to become real weak ref for GObject-derived instances
(GObject supports weak refs that are automatically nulled when the refered
object dies).
--
Jan 'Bulb' Hudec <[email protected]>
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list