Re: [Vala] x11.vapi is broken
- From: pancake <pancake youterm com>
- To: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] x11.vapi is broken
- Date: Mon, 25 Jan 2010 14:31:56 +0100
mmh, I cannot reproduce it now :/
But with this test case I get really weird errors:
pancake flubox:~$ cat test.vala
using X;
void main() {
var food = X.Drawable();
}
pancake flubox:~$ valac test.vala --pkg x11
test.vala:4.6-4.24: warning: local variable `food' declared but never used
var food = X.Drawable();
^^^^^^^^^^^^^^^^^^^
** (valac:8842): CRITICAL **: vala_ccode_unary_expression_construct:
assertion `expr != NULL' failed
** (valac:8842): CRITICAL **: vala_ccode_function_call_add_argument:
assertion `expr != NULL' failed
/home/pancake/test.vala.c: In function ‘_main’:
/home/pancake/test.vala.c:22: error: too few arguments to function ‘memset’
error: cc exited with status 256
Compilation failed: 1 error(s), 1 warning(s)
pancake flubox:~$
It is trying to call memset with only two arguments:
food = memset (0, sizeof (Drawable));
if should be memset(&food, 0, sizeof (Drawable));
this is only happening with the X11 Drawable struct, maybe the problem
is that you can define
empty structures in vapi, but cannot in vala. So maybe there's soemthing
wrong in the codegen
module that handles empty structures incorrectly (dont know, just guessing).
Evan Nemerson wrote:
Jürg and I have both tried to duplicate this, to no avail--are you still
having the problem? If so, would you mind attaching a test case to
https://bugzilla.gnome.org/show_bug.cgi?id=607955
Thanks
-Evan
On Tue, 2010-01-19 at 13:41 +0100, pancake wrote:
using Gdk and X11 packages results in a compilation error:
x11.vapi:295.2-295.32: error: The base type `Gdk.Drawable` of struct
`X.Window` is not a struct
public struct Window : Drawable {
x11.vapi:284.27-284.28: error: The type name `ID' could not be found
public struct Drawable : ID
patch is attached. But probably Vala should priorize the name resolution
if the type is defined inside the same namespace (this solution will be
better, but will require a patch in vala compiler)
This is only broken in git. 0.7.9 is ok
--pancake
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]