From 29c7a288177c260cf2b3d8f80e807305b96594ba Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 Jan 2009 20:07:13 +0100 Subject: kill autoload stuff as planned --- src/pulse/internal.h | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'src/pulse/internal.h') diff --git a/src/pulse/internal.h b/src/pulse/internal.h index 5fe4210e..9a2d6457 100644 --- a/src/pulse/internal.h +++ b/src/pulse/internal.h @@ -225,20 +225,37 @@ void pa_stream_set_state(pa_stream *s, pa_stream_state_t st); pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *tag); -#define PA_CHECK_VALIDITY(context, expression, error) do { \ - if (!(expression)) \ +#define PA_CHECK_VALIDITY(context, expression, error) \ + do { \ + if (!(expression)) \ return -pa_context_set_error((context), (error)); \ -} while(0) + } while(FALSE) -#define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) do { \ - if (!(expression)) { \ - pa_context_set_error((context), (error)); \ - return value; \ - } \ -} while(0) +#define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) \ + do { \ + if (!(expression)) { \ + pa_context_set_error((context), (error)); \ + return value; \ + } \ + } while(FALSE) -#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, NULL) +#define PA_CHECK_VALIDITY_RETURN_NULL(context, expression, error) \ + PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, NULL) + +#define PA_FAIL(context, error) \ + do { \ + return -pa_context_set_error((context), (error)); \ + } while(FALSE) + +#define PA_FAIL_RETURN_ANY(context, error, value) \ + do { \ + pa_context_set_error((context), (error)); \ + return value; \ + } while(FALSE) + +#define PA_FAIL_RETURN_NULL(context, error) \ + PA_FAIL_RETURN_ANY(context, error, NULL) void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t); -- cgit