[vlc-devel] Announce: brand new python bindings (ctypes-based)

jpd at videolan.org jpd at videolan.org
Fri Jul 31 12:42:08 CEST 2009


On Fri, Jul 31, 2009 at 12:29:04PM +0200, R??mi Denis-Courmont wrote:
> We need to study this on a case by case basis. If a function really has no
> good error value - that is outside the range of otherwise legal values, I
> see no option but to return an int for error handling and pass the result
> through a pointer in case of success. I readily admit that I have not
> reviewed the entire API set as yet.

For this model I would opt to simply always return a status and pass
values, if any, though pointers. In programming it makes very little
difference: You'd end up storing the returned value anyway, because the
error return needs to be evaluated first.

I would happily make exceptions for all functions that cannot return
with an error, such as is_playing() and other accessors that can give a
meaningful result even if there is no meaningful input.




More information about the vlc-devel mailing list