Re: [Vala] realpath compiles incorrectly
- From: Jonas Kulla <nyocurio gmail com>
- To: rastersoft <raster rastersoft com>
- Cc: Vala Mail List <vala-list gnome org>
- Subject: Re: [Vala] realpath compiles incorrectly
- Date: Wed, 13 Mar 2013 17:44:22 +0100
2013/3/13 rastersoft <raster rastersoft com>
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]