mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
add pa_strbuf_isempty
This commit is contained in:
parent
b4d80462bf
commit
4a66837b83
2 changed files with 9 additions and 0 deletions
|
|
@ -180,3 +180,9 @@ size_t pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) {
|
|||
size *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
pa_bool_t pa_strbuf_isempty(pa_strbuf *sb) {
|
||||
pa_assert(sb);
|
||||
|
||||
return sb->length <= 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
***/
|
||||
|
||||
#include <pulse/gccmacro.h>
|
||||
#include <pulsecore/macro.h>
|
||||
|
||||
typedef struct pa_strbuf pa_strbuf;
|
||||
|
||||
|
|
@ -35,4 +36,6 @@ size_t pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) PA_GCC_PRINTF_A
|
|||
void pa_strbuf_puts(pa_strbuf *sb, const char *t);
|
||||
void pa_strbuf_putsn(pa_strbuf *sb, const char *t, size_t m);
|
||||
|
||||
pa_bool_t pa_strbuf_isempty(pa_strbuf *sb);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue