context: constify pa_context_set_error()

This allows constifying public API functions that report their errors
via the context error but don't modify the context in any other way.
Philosophical arguments could be made why this is wrong, but I believe
in practice this is a net positive change.
This commit is contained in:
Tanu Kaskinen 2018-06-18 11:13:40 +03:00
parent d251665f22
commit e7c88ee169
2 changed files with 2 additions and 2 deletions

View file

@ -313,7 +313,7 @@ void pa_context_set_state(pa_context *c, pa_context_state_t st) {
pa_context_unref(c);
}
int pa_context_set_error(pa_context *c, int error) {
int pa_context_set_error(const pa_context *c, int error) {
pa_assert(error >= 0);
pa_assert(error < PA_ERR_MAX);