Re: [Vala] Autovala: new program for developers



2013/4/14 Francis Giraldeau <francis giraldeau gmail com>

I have some problem to compile configuration.vala, seems related to Posix:


/home/francis/workspace-vala/autovala/src/autovala_lib/configuration.c:2264:2:
error: too many arguments to function ‘realpath’

Here is the generated C code:

_tmp35_ = realpath (_tmp34_, NULL, 0);

The problem is that realpath takes only two arguments, but three are
passed. This is not related to autovala, I can reproduce the problem
with this small snippet:

#!/usr/bin/vala --debug --verbose --save-temps --pkg posix

using Posix;

class Realpath : GLib.Object {

public static int main(string[] args) {
string path = Posix.realpath("realpath.vala");
GLib.stdout.printf("test %s\n", path);
return 0;
}

}

I runs on Ubuntu 12.10 with vala-0.18. Does somebody else have this
problem?

Cheers,

Francis


Hi,

I think that's something that came up recently on the list:
https://mail.gnome.org/archives/vala-list/2013-March/msg00012.html

Basically, the prototype in the vapi needs to be:

[CCode (cheader_filename = "stdlib.h")]
public string? realpath (string path, [CCode (array_length=false)] uint8[]?
resolved_path = null);

Jonas


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]