commit ad3736ab8d685097eeb208eef4adba7ff3c6b381
parent 2029333be7a93b98bb0356ac3e6cd8ca1c7db211
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Mon, 23 May 2022 09:41:35 +0200
Makes the connection between posix_fd flags and its usage more obvious
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/clap/ext/posix-fd-support.h b/include/clap/ext/posix-fd-support.h
@@ -17,6 +17,7 @@ enum {
CLAP_POSIX_FD_WRITE = 1 << 1,
CLAP_POSIX_FD_ERROR = 1 << 2,
};
+typedef uint32_t clap_posix_fd_flags_t;
typedef struct clap_plugin_posix_fd_support {
// This callback is "level-triggered".
@@ -25,15 +26,15 @@ typedef struct clap_plugin_posix_fd_support {
// done writting.
//
// [main-thread]
- void (*on_fd)(const clap_plugin_t *plugin, int fd, int flags);
+ void (*on_fd)(const clap_plugin_t *plugin, int fd, clap_posix_fd_flags_t flags);
} clap_plugin_posix_fd_support_t;
typedef struct clap_host_posix_fd_support {
// [main-thread]
- bool (*register_fd)(const clap_host_t *host, int fd, int flags);
+ bool (*register_fd)(const clap_host_t *host, int fd, clap_posix_fd_flags_t flags);
// [main-thread]
- bool (*modify_fd)(const clap_host_t *host, int fd, int flags);
+ bool (*modify_fd)(const clap_host_t *host, int fd, clap_posix_fd_flags_t flags);
// [main-thread]
bool (*unregister_fd)(const clap_host_t *host, int fd);