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


_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to