[Vala] Writing VAPI: How to call struct member?



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]