Re: [Vala] How do I call functions which have a "ref" variable as one of their argument
- From: Jürg Billeter <j bitron ch>
- To: "Jaap A. Haitsma" <jaap haitsma org>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] How do I call functions which have a "ref" variable as one of their argument
- Date: Tue, 07 Apr 2009 15:31:51 +0200
On Tue, 2009-04-07 at 15:19 +0200, Jaap A. Haitsma wrote:
I've wanted to restart working on my vala branch of cheese. In the
meantime vala has received quite some changes. Therefore it does not
compile anymore. The main problem I have are "ref" variables. For
example with the text_extents method of Cairo
TextExtents extents;
text_extents ("hello", ref extents);
This does not compile because the compiler says.
"use of possibly unassigned local variable `extents' text_extents
("hello", ref extents);"
What should I do here or is it a bug in text_extents?
This is a bug in text_extents, it should be an `out' parameter (should
have been from the beginning). Fixed in master.
RawError dbus_error;
dbus_error.init ();
complains about the fact that dbus_error is unassigned.
That is a bad binding, improved now in master:
// calls dbus_error_init in the generated code
var dbus_error = RawError ();
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]