Re: [Vala] va_arg in Vala
- From: "Jan Hudec" <bulb ucw cz>
- To: kuteynikov gmail com
- Cc: vala-list gnome org
- Subject: Re: [Vala] va_arg in Vala
- Date: Mon, 24 Aug 2009 14:22:28 +0200 (CEST)
Hello,
On Mon, August 24, 2009 11:38, ĐŃŃоКникОв ĐПиŃŃиК wrote:
Hello! How to use va_arg and va_list in Vala functions? I managed to use
it
in vapi bindings, but can't create pure-Vala function with variable list
of
parameters.
I think vala functions should use GLib.Value[] (or Glib.ValueArray)
for passing variable arguments. However, I don't know whether it
implements either of:
- The (params Value[] args) syntax to automagically create the array
from normally-looking call (same syntax as C#).
- Creating Values by, even implicitly, casting something.
- Casting values to the original types with 'as' and testing them with
'is' operators or some similar operators. Normally these work on object
references, but something might not be an object reference.
I think it should, so if it does not, it's a feature request. I don't
have vala around (@work) and I don't see documentation saying either
way.
Alternatively, would it work with Object[] and object references?
I don't think int? works as Object in vala.
--
- Jan Hudec <bulb ucw cz>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]