From 7f885b6db4f442b38ffedc61b62cd0084a535380 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Jul 2019 21:13:26 +0200 Subject: [PATCH] add SPA_SENTINEL --- spa/include/spa/utils/defs.h | 4 +++- src/pipewire/properties.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spa/include/spa/utils/defs.h b/spa/include/spa/utils/defs.h index f5ba1d656..523390ac3 100644 --- a/spa/include/spa/utils/defs.h +++ b/spa/include/spa/utils/defs.h @@ -153,12 +153,14 @@ struct spa_param_info { #define SPA_PRINTF_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) #define SPA_ALIGNED(align) __attribute__((aligned(align))) #define SPA_DEPRECATED __attribute__ ((deprecated)) -#define SPA_EXPORT __attribute__ ((visibility("default"))) +#define SPA_EXPORT __attribute__((visibility("default"))) +#define SPA_SENTINEL __attribute__((__sentinel__)) #else #define SPA_PRINTF_FUNC(fmt, arg1) #define SPA_ALIGNED(align) #define SPA_DEPRECATED #define SPA_EXPORT +#define SPA_SENTINEL #endif #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L diff --git a/src/pipewire/properties.h b/src/pipewire/properties.h index cb2450787..05261083f 100644 --- a/src/pipewire/properties.h +++ b/src/pipewire/properties.h @@ -46,7 +46,7 @@ struct pw_properties { }; struct pw_properties * -pw_properties_new(const char *key, ...); +pw_properties_new(const char *key, ...) SPA_SENTINEL; struct pw_properties * pw_properties_new_dict(const struct spa_dict *dict);