[Vala] Optional output parameters?
- From: Jan Hudec <bulb ucw cz>
- To: vala-list gnome org
- Subject: [Vala] Optional output parameters?
- Date: Thu, 9 Apr 2009 19:10:39 +0000 (UTC)
Hello Folks,
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.
Thanks,
Jan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]