mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	add SPA_SENTINEL
This commit is contained in:
		
							parent
							
								
									39c01ba2fe
								
							
						
					
					
						commit
						9b4b915f25
					
				
					 3 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -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);
 | 
						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, ...)
 | 
					spa_pod_builder_add(struct spa_pod_builder *builder, const char *format, ...)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	void *res;
 | 
						void *res;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -129,12 +129,14 @@ struct spa_fraction {
 | 
				
			||||||
#define SPA_PRINTF_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
 | 
					#define SPA_PRINTF_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
 | 
				
			||||||
#define SPA_ALIGNED(align) __attribute__((aligned(align)))
 | 
					#define SPA_ALIGNED(align) __attribute__((aligned(align)))
 | 
				
			||||||
#define SPA_DEPRECATED __attribute__ ((deprecated))
 | 
					#define SPA_DEPRECATED __attribute__ ((deprecated))
 | 
				
			||||||
#define SPA_EXPORT __attribute__ ((visibility("default")))
 | 
					#define SPA_EXPORT __attribute__((visibility("default")))
 | 
				
			||||||
 | 
					#define SPA_SENTINEL __attribute__((__sentinel__))
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define SPA_PRINTF_FUNC(fmt, arg1)
 | 
					#define SPA_PRINTF_FUNC(fmt, arg1)
 | 
				
			||||||
#define SPA_ALIGNED(align)
 | 
					#define SPA_ALIGNED(align)
 | 
				
			||||||
#define SPA_DEPRECATED
 | 
					#define SPA_DEPRECATED
 | 
				
			||||||
#define SPA_EXPORT
 | 
					#define SPA_EXPORT
 | 
				
			||||||
 | 
					#define SPA_SENTINEL
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SPA_ROUND_DOWN_N(num,align)	((num) & ~((align) - 1))
 | 
					#define SPA_ROUND_DOWN_N(num,align)	((num) & ~((align) - 1))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,7 @@ struct pw_properties {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct pw_properties *
 | 
					struct pw_properties *
 | 
				
			||||||
pw_properties_new(const char *key, ...);
 | 
					pw_properties_new(const char *key, ...) SPA_SENTINEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct pw_properties *
 | 
					struct pw_properties *
 | 
				
			||||||
pw_properties_new_dict(const struct spa_dict *dict);
 | 
					pw_properties_new_dict(const struct spa_dict *dict);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue