return path.buf;
}
-static void hook_clear(struct hook *h, cb_data_free_fn cb_data_free)
+static void hook_clear(struct hook *h, hook_data_free_fn cb_data_free)
{
if (!h)
return;
free(h);
}
-void hook_list_clear(struct string_list *hooks, cb_data_free_fn cb_data_free)
+void hook_list_clear(struct string_list *hooks, hook_data_free_fn cb_data_free)
{
struct string_list_item *item;
void *feed_pipe_cb_data;
};
-typedef void (*cb_data_free_fn)(void *data);
-typedef void *(*cb_data_alloc_fn)(void *init_ctx);
+typedef void (*hook_data_free_fn)(void *data);
+typedef void *(*hook_data_alloc_fn)(void *init_ctx);
struct run_hooks_opt {
/* Environment vars to be set for each hook */
*
* The `feed_pipe_ctx` pointer can be used to pass initialization data.
*/
- cb_data_alloc_fn feed_pipe_cb_data_alloc;
+ hook_data_alloc_fn feed_pipe_cb_data_alloc;
/**
* Called to free the memory initialized by `feed_pipe_cb_data_alloc`.
*
* Must always be provided when `feed_pipe_cb_data_alloc` is provided.
*/
- cb_data_free_fn feed_pipe_cb_data_free;
+ hook_data_free_fn feed_pipe_cb_data_free;
};
#define RUN_HOOKS_OPT_INIT { \
* Frees the memory allocated for the hook list, including the `struct hook`
* items and their internal state.
*/
-void hook_list_clear(struct string_list *hooks, cb_data_free_fn cb_data_free);
+void hook_list_clear(struct string_list *hooks, hook_data_free_fn cb_data_free);
/**
* Frees the hook configuration cache stored in `struct repository`.