Hi,

read(2) is a system call like this:
ssize_t read(int fd, void *buf, size_t count)

I believe that Vala 0.10 has read method like this:
ssize_t read (uint8[] buffer, size_t count, Cancellable? cancellable = null)

You should see the similarity.

I'm dealing with some code that uses 0.10 read() in multiple places.

However, "count" parameter seems to be removed in later Vala versions since the code doesn't compile with later Vala versions.

I noted that there is new method called read_bytes() that provides similar semantic.
http://valadoc.org/#!api=gio-2.0/GLib.InputStream.read_bytes

However, 0.14 says it doesn't know the type Bytes while 0.16 says it doesn't know read_bytes() method.

Do I have to use 0.18? Can I have read(2) semantic on 0.12/0.14/0.16?

A more general question, is there versioned Vala documentation available online?
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to