[Vala] Check if pointer is null
- From: Frederik <scumm_fredo gmx net>
- To: vala-list gnome org
- Subject: [Vala] Check if pointer is null
- Date: Wed, 07 May 2008 09:38:02 +0200
How do I check if a pointer is null?
pointer my_pointer = null;
if (null == my_pointer) {
GLib.print("pointer is null\n");
}
gets translated to:
gpointer my_pointer;
my_pointer = NULL;
if (NULL == &my_pointer) {
g_print ("pointer is null\n");
}
which is not what I intended.
Thanks
Frederik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]