add SPA_SENTINEL

This commit is contained in:
Wim Taymans 2019-07-09 21:13:26 +02:00
parent 39c01ba2fe
commit 9b4b915f25
3 changed files with 5 additions and 3 deletions

View file

@ -574,7 +574,7 @@ spa_pod_builder_addv(struct spa_pod_builder *builder,
return spa_pod_builder_deref(builder, builder->frame[builder->state.depth].ref);
}
static inline __attribute__((__sentinel__)) void *
static inline SPA_SENTINEL void *
spa_pod_builder_add(struct spa_pod_builder *builder, const char *format, ...)
{
void *res;

View file

@ -129,12 +129,14 @@ struct spa_fraction {
#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
#define SPA_ROUND_DOWN_N(num,align) ((num) & ~((align) - 1))

View file

@ -40,7 +40,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);