Re: [Vala] Does vala have a preprocessor?
- From: "Maciej Piechotka" <uzytkownik2 gmail com>
- To: gege2061 <gege2061 redaction-developpez com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Does vala have a preprocessor?
- Date: Tue, 6 May 2008 12:05:49 +0200
On Tue, May 6, 2008 at 10:20 AM, gege2061
<gege2061 redaction-developpez com> wrote:
Hello,
I would like use this feature, but this code doesn't work:
public class Hack
{
[Conditional (condition=define (G_OS_WIN32))]
[CCode (cheader_filename = "gdk/gdkwin32.h", cname = "GDK_WINDOW_HWND")]
public static uint32 get_handle (Gdk.Drawable drawable);
[Conditional (condition=define (G_OS_UNIX))]
[CCode (cheader_filename = "gdk/gdkx.h", cname = "GDK_WINDOW_XWINDOW")]
public static uint32 get_handle (Gdk.Drawable drawable);
}
What is syntax of condition?
public class Hack
{
[Conditional (condition=G_OS_WIN32)]
[CCode (cheader_filename = "gdk/gdkwin32.h", cname = "GDK_WINDOW_HWND")]
public static uint32 get_handle (Gdk.Drawable drawable);
[Conditional (condition=G_OS_UNIX)]
[CCode (cheader_filename = "gdk/gdkx.h", cname = "GDK_WINDOW_XWINDOW")]
public static uint32 get_handle (Gdk.Drawable drawable);
}
And compilation with -DG_OS_UNIX or -DG_OS_WIN32.
Regards
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]