[Vala] Writing VAPI: How to call struct member?
- From: "marcin saepia net" <marcin saepia net>
- To: vala <vala-list gnome org>
- Subject: [Vala] Writing VAPI: How to call struct member?
- Date: Mon, 8 Aug 2016 14:49:54 +0200
Hello,
I am writing VAPI to the Java Native Interface.
I have there JavaVM struct.
In my function I get pointer to one.
I would like to call its member function, like this:
(*vm)->GetEnv(...)
When I define my VAPI in such way
[CCode (cname = "JavaVM")]
public struct JavaVM {
[CCode (cname = "GetEnv")]
public int get_env(out unowned Env env, Version version);
}
I am getting C Code
GetEnv(vm, param1, param2)
instead of
(*vm)->GetEnv(param1, param2)
How can I write VAPI to achieve the second result in the C code?
Marcin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]