mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-27 03:20:06 +01:00
util: define a cleanup for stringbuf
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1184>
This commit is contained in:
parent
829aec8055
commit
ae423bc3fe
1 changed files with 3 additions and 0 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "util-macros.h"
|
||||
#include "util-mem.h"
|
||||
|
||||
struct stringbuf {
|
||||
char *data;
|
||||
|
|
@ -74,6 +75,8 @@ stringbuf_destroy(struct stringbuf *b)
|
|||
free(b);
|
||||
}
|
||||
|
||||
DEFINE_DESTROY_CLEANUP_FUNC(stringbuf);
|
||||
|
||||
static inline char *
|
||||
stringbuf_steal_destroy(struct stringbuf *b)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue