Re: [Vala] Compilation error using XClientMessageEvent
- From: Axel FILMORE <axel filmore gmail com>
- To: Timo Kluck <tkluck infty nl>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Compilation error using XClientMessageEvent
- Date: Fri, 13 Jan 2012 20:50:13 +0100
Well, no, currently I can't get it to compile, this sample code is from an
implementation of the system tray specification :
http://standards.freedesktop.org/systemtray-spec/systemtray-spec-latest.html
There's other implementations in plain C but I'd prefer to have it in Vala,
that's cleaner that mixing C and Vala.
I think that code worked before maybe with another version of the compiler
or with a modified vapi file, I don't know.
:)
On 13/01/2012 19:54, Timo Kluck wrote:
Hi Axel,
I'm missing something, any help would be appreciated.
Thanks.
I tried modifying x11.vala like this, which almost makes your code work:
[CCode (cname = "union { char b[20]; short s[10]; long l[5]; }")]
public struct ClientMessageEventData {
which gives the following error:
incompatible types when assigning to type ‘union<anonymous>’ from
type ‘union<anonymous>’
So it turns out that you cannot make your own variable of the same
type as the anonymous union and have C consider them as the same type.
I don't think there's an easy way out of this. The fact that the union
is anonymous is beyond vala's control.
Does copying the entire ClientMessageEvent work for you?
Timo Kluck
--
Axel FILMORE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]