[Vala] Compact class with an unusual (in GLib terms) constructor



Hello,

libjwt[1] has a strange constructor in GLib terms:

int jwt_new(jwt_t **jwt);

It returns 0 on success (like many C functions) or any valid errno on
failure. I made the following binding for now:

[CCode (cname = "jwt_new")]
public static int create(out JWT jwt);

Is there a better way to do this?

Best,
Gergely


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