Re: [Vala] How to pass null to Gst.init?
- From: Jonathan Moerman <jonathanmoerman gmail com>
- To: "marcin saepia net" <marcin saepia net>
- Cc: vala <vala-list gnome org>
- Subject: Re: [Vala] How to pass null to Gst.init?
- Date: Tue, 23 Aug 2016 15:33:34 +0200
Try something like:
string[]? argv = null;
Gst.init(ref argv);
With reference parameters you're passing a pointer, this pointer can't be
null, but the value it points to can be null.
Jonathan Moerman
2016-08-23 15:13 GMT+02:00 marcin saepia net <marcin saepia net>:
Hello,
I would like to pass NULL to Gst.init. I intentionally do not want to pass
argv.
It is defined as
void Gst.init (ref unowned string[]? argv)
but if I pass null it throws
error: Argument 1: Cannot pass null to reference parameter
Gst.init(null);
despite parameter type having "?"
How can I achieve this?
m.
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]