[Vala] Vala bindings for getaddrinfo and similar Unix API



What is the most correct binding:
namespace Test {
[CCode]
struct AddrInfo {
  ....
}

A:

[CCode]
public static int getaddrinfo(string host, string service, AddrInfo
*hint, AddrInfo **result);

B:

[CCode]
public static int getaddrinfo(string host, string service, AddrInfo
hint, AddrInfo *result);

}

When declare this in vala:

A gives:

AddrInfo hint;
weak AddrInfo []result;
Test.getaddrinfo(host, serv, &hint, &result)

B gives:

AddrInfo hint;
weak AddrInfo []result;
Test.getaddrinfo(host, serv, hint, &result)





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