Re: [Vala] Optional output parameters?
- From: "Sam Liddicott" <sam liddicott com>
- To: Jan Hudec <bulb ucw cz>, <vala-list gnome org>
- Subject: Re: [Vala] Optional output parameters?
- Date: Thu, 09 Apr 2009 22:11:48 +0100
The expression of an out parameter must be an LHS (left hand side) assigment.
You can try
You'll have to fill inh_type with thr right type
From: Jan Hudec <bulb ucw cz>
Sent: 09 April 2009 20:10
To: vala-list gnome org
Subject: [Vala] Optional output parameters?
I want to use the Glib.Process.spawn_async_with_pipes
(g_spawn_async_with_pipes) function. It has three output parameters through
which is passes back pipes it connected to the newly created process' stdin,
stdout and stderr respectively. The underlying function will not create the
pipes if the respective pointer is NULL.
Now that would be OK, if whether it will need the handler or not didn't depend
on an argument of the calling function. I want to construct a conditional
expression (to avoid having four calls to the spawn_async_with_pipes), that
will pass either pointer to the variable or NULL, but I am out of guesses.
I tried various things like:
condition ? out inh : null
out condition ? inh : null
out (condition ? inh : null)
and always got either "incompatible expressions" or "syntax error" errors.
Vala-list mailing list
Vala-list gnome org
] [Thread Prev