[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [libnbd] Slight API inconsistency



The callback (e.g. for `nbd_block_status`) now has a support for returning
errors thanks to the last parameter (`int *error`), so it was switched to
returning void.  But that was not switched everywhere and some code expects it
to return `int`.  Yet another inconsistency is in the debug callback, which is
supposed to return `void`, I guess, but due to the way the generator is
implemented it's defined to return `int` instead.

So my question is, should all callbacks just return nothing and if there is a
need for some information to get back they will just use a pointer to some data
(like with the `int *error`)?  Or do we need different return types for
callbacks and should `Callback` and `CallbackPersist` be defined as:
`string * arg list * ret` ?

Have a nice day,
Martin

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]