s/_func/_fn/
This commit is contained in:
16
common.c
16
common.c
@@ -595,7 +595,7 @@ struct str_map_iter
|
||||
|
||||
#define STR_MAP_MIN_ALLOC 16
|
||||
|
||||
typedef void (*str_map_free_func) (void *);
|
||||
typedef void (*str_map_free_fn) (void *);
|
||||
|
||||
static void
|
||||
str_map_init (struct str_map *self)
|
||||
@@ -834,15 +834,15 @@ xclose (int fd)
|
||||
// I don't expect this to be much of an issue, as there are typically not going
|
||||
// to be that many FD's to watch, and the linear approach is cache-friendly.
|
||||
|
||||
typedef void (*poller_dispatcher_func) (const struct pollfd *, void *);
|
||||
typedef void (*poller_timer_func) (void *);
|
||||
typedef void (*poller_dispatcher_fn) (const struct pollfd *, void *);
|
||||
typedef void (*poller_timer_fn) (void *);
|
||||
|
||||
#define POLLER_MIN_ALLOC 16
|
||||
|
||||
struct poller_timer_info
|
||||
{
|
||||
int64_t when; ///< When is the timer to expire
|
||||
poller_timer_func dispatcher; ///< Event dispatcher
|
||||
poller_timer_fn dispatcher; ///< Event dispatcher
|
||||
void *user_data; ///< User data
|
||||
};
|
||||
|
||||
@@ -951,7 +951,7 @@ poller_timers_heapify_up (struct poller_timers *self, size_t index)
|
||||
|
||||
static ssize_t
|
||||
poller_timers_find (struct poller_timers *self,
|
||||
poller_timer_func dispatcher, void *data)
|
||||
poller_timer_fn dispatcher, void *data)
|
||||
{
|
||||
// NOTE: there may be duplicates.
|
||||
for (size_t i = 0; i < self->len; i++)
|
||||
@@ -972,7 +972,7 @@ poller_timers_find_by_data (struct poller_timers *self, void *data)
|
||||
|
||||
static void
|
||||
poller_timers_add (struct poller_timers *self,
|
||||
poller_timer_func dispatcher, void *data, int timeout_ms)
|
||||
poller_timer_fn dispatcher, void *data, int timeout_ms)
|
||||
{
|
||||
if (self->len == self->alloc)
|
||||
self->info = xreallocarray (self->info,
|
||||
@@ -1008,7 +1008,7 @@ struct poller_info
|
||||
{
|
||||
int fd; ///< Our file descriptor
|
||||
short events; ///< The poll() events we registered for
|
||||
poller_dispatcher_func dispatcher; ///< Event dispatcher
|
||||
poller_dispatcher_fn dispatcher; ///< Event dispatcher
|
||||
void *user_data; ///< User data
|
||||
};
|
||||
|
||||
@@ -1115,7 +1115,7 @@ poller_poll_to_epoll_events (short events)
|
||||
|
||||
static void
|
||||
poller_set (struct poller *self, int fd, short events,
|
||||
poller_dispatcher_func dispatcher, void *data)
|
||||
poller_dispatcher_fn dispatcher, void *data)
|
||||
{
|
||||
ssize_t index = poller_find_by_fd (self, fd);
|
||||
bool modifying = true;
|
||||
|
||||
Reference in New Issue
Block a user