[pulseaudio-discuss] pa_modargs interface question

Ulrich Eckhardt pulseaudio at base-42.de
Sun Jul 3 19:43:26 UTC 2016


Looking at the various functions in modargs.h and their concrete
behaviour. What I find odd there is that the functions return an
errorcode (an int, wouldn't it be worthwhile to use a typedef for that?)
but that they don't always return an error when extracting an argument
fails. In particular when the argument is not present, they return
success nonetheless.

At first, I thought that was a bug. However, that peculiar behaviour is
present in every pa_modargs_get_value_* function, and I rather think
that it's intention. The intention is that the supplied pointer to the
value is supposed to give both the default value and the output
value, right? In that case, I'd try to create a patch that makes this
more explicit from the documentation. 

Greetings from Hamburg!


More information about the pulseaudio-discuss mailing list