[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Vala] Some problems with migration to Vala 0.3.1
- From: gege2061 <gege2061 redaction-developpez com>
- To: "Vala ML" <vala-list gnome org>
- Subject: Re: [Vala] Some problems with migration to Vala 0.3.1
- Date: Thu, 24 Apr 2008 23:04:59 +0200
For nullable types, I understand, it's me the bug...
2008/4/24 gege2061 <gege2061 redaction-developpez com>:
> Hello,
>
> I develop a project and I have some problems following the update of Vala.
>
> First, with nullable types :
>
> - I can't use null with string, for example :
> --------------------------------------------------------------------------------
> public static void add_child (string! filename, string! xpath, string! name,
> string content=null)
> --------------------------------------------------------------------------------
>
> Makes a warning :
> --------------------------------------------------------------------------------
> warning: `null' incompatible with parameter type `string`
> --------------------------------------------------------------------------------
>
> - ! operator is deprected ? How force no-null parameter ?
>
>
>
> Second, with length function :
> --------------------------------------------------------------------------------
> Xml.NodeSet* node = ...;
>
> nodes->length ();
> --------------------------------------------------------------------------------
>
> is transformed to c code :
> --------------------------------------------------------------------------------
> xmlXPathNodeSetGetLength (((gpointer) nodes));
> --------------------------------------------------------------------------------
>
> but xmlXPathNodeSetGetLength is macro extend to :
> --------------------------------------------------------------------------------
> ((ns) ? (ns)->nodeNr : 0)
> --------------------------------------------------------------------------------
>
> Makes an error :
> --------------------------------------------------------------------------------
> warning: dereferencing 'void *' pointer
> error: request for member 'nodeNr' in something not a structure or union
> --------------------------------------------------------------------------------
>
> Merci d'avance pour votre aide.
> --
> Nicolas Joseph
>
> Responsable de la rubrique GTK+ de developpez.com
>
> http://nicolasj.developpez.com
>
--
Nicolas Joseph
Responsable de la rubrique GTK+ de developpez.com
http://nicolasj.developpez.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]