On 11 June 2010 17:19, pancake <pancake_AT_youterm.com> wrote:
> In GObject, exceptions, or errors are passed as reference in an
> argument, so the return value can be used without restrictions:
>
> for example:
>
> unsigned int read(int fd, ref char *buf, unsigned int buf_len, GError
> **err);
>
> (yeah, thats a silly example, but it allows you to make reads bigger than 31
> bits
> without having to check for the return value) In other situations it is good
> to handle errors in this way, but thinking on some restrictions allows
> you to mix error values and data in the same pipe.
One nice thing about Plan 9 is its "exits(char *msg)" function, which
lets you return a string at termination, which sort of serves the same
purpose, except for programs rather than functions...
cls
Received on Fri Jun 11 2010 - 18:58:11 UTC
This archive was generated by hypermail 2.2.0 : Fri Jun 11 2010 - 19:00:03 UTC