2013/3/13 rastersoft <[email protected]> > Hi all: > > I'm trying to use Posix.realpath, but I'm unable, because Vala seems to > compile it incorrectly. I receive this message: > > .vala.c:920:2: error: too many argument for function ‘realpath’ > > I put in my code: > > string tmp; > tmp=Posix.realpath(this.config_path); > > And it is compiled to > > _tmp35_ = realpath (_tmp34_, NULL, 0); > > When "realpath" only has two parameters, not three. > > The VAPI seems fine, both in valac-0.16 and valac-0.18: > > [CCode (cheader_filename = "stdlib.h")] > public string? realpath (string path, uint8[]? resolved_path = null); > > Is this a bug, or am I doing something wrong? > > Thanks >
The prototype declaration in the vapi is wrong. I think it should be [CCode (cheader_filename = "stdlib.h")] public string? realpath (string path, [CCode (array_length=false)] uint8[]? resolved_path = null); Can you try it this way? Jonas _______________________________________________ vala-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/vala-list
