Re: [Vala] difference between using IntegerType and inheriting

2014-01-06 Thread rastersoft
My question, really, is which one is the best to define in a VAPI file a typedef. This is: if I have in C #typedef uint32_t xcb_atom_t; is better to define it as: [SimpleType] [IntegerType (rank = 9)] [CCode (cname = xcb_atom_t, has_type_id = false)] public struct Atom {

Re: [Vala] difference between using IntegerType and inheriting

2014-01-06 Thread Luca Bruno
Guess the second. On Mon, Jan 6, 2014 at 12:00 PM, rastersoft ras...@rastersoft.com wrote: My question, really, is which one is the best to define in a VAPI file a typedef. This is: if I have in C #typedef uint32_t xcb_atom_t; is better to define it as: [SimpleType]

[Vala] Change in 0.23.1 for array ownership and .length parameter

2014-01-06 Thread Jim Nelson
Just wanted to give everyone a head's-up about a change that appeared in Vala 0.23. Previously you could do this in Vala: uint8[] ar = new uint8[10]; // ... fill ar with interesting bytes ... process((owned) ar, ar.length); ... where process() takes an array and a length field (sometimes

Re: [Vala] Change in 0.23.1 for array ownership and .length parameter

2014-01-06 Thread Tal Hadad
This case trigger me a question I wanted to ask before. Why transforming ownership is nulling the original variable? Instead of nulling, maybe just change variable to behave as unowned. You might say that there is a problem in my solution, like this code: uint8[] ar = new uint8[10]; if