Re: [Vala] Check if pointer is null
- From: "Juerg Billeter" <j bitron ch>
- To: "Frederik" <scumm_fredo gmx net>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Check if pointer is null
- Date: Wed, 7 May 2008 10:05:06 +0200 (CEST)
On Wed, May 7, 2008 09:38, Frederik wrote:
How do I check if a pointer is null?
pointer my_pointer = null;
if (null == my_pointer) {
GLib.print("pointer is null\n");
}
Don't use `pointer', it has been replaced by native pointer support some
time ago and completely removed in Vala 0.3.1.
The following code snippet works fine:
void* my_pointer = null;
if (null == my_pointer) {
message ("pointer is null");
}
Juerg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]