Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.80 KB | None | 0 0
  1. //Vapi file:
  2. public async bool prepare_async ([CCode (array_length = false, array_null_terminated = true)] GLib.Quark[]? features) throws GLib.Error;
  3.  
  4.  
  5. //How I try to use it:
  6. GLib.Quark q[] = new GLib.Quark[1];
  7. q[0] = GLib.Quark.from_string(IFACE_CLIENT_INTERFACE_REQUESTS);
  8. con.prepare_async.begin(null, (obj, result) => {
  9.  //...
  10. });
  11.  
  12.  
  13.  
  14. //Error:
  15. main.vala.c: In function ‘__lambda4_’:
  16. main.vala.c:413:9: error: array size missing in ‘q’
  17. /home/baedert/Code/Vala/tp-glib/src/main.vala:55:4: error: incompatible types when assigning to type ‘GQuark[1]’ from type ‘GQuark *
  18. /home/baedert/Code/Vala/tp-glib/src/main.vala:45:4: error: incompatible types when assigning to type ‘GQuark[1]’ from type ‘void *
  19. error: cc exited with status 256
  20. Compilation failed: 1 error(s), 0 warning(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement