From 5f56b97a34e753ef577c0827d3ac6f409c5bed4f Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Jan 2022 15:08:45 +0100 Subject: [PATCH] [event] const char *name --- src/main/event.c | 2 +- src/main/event.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/event.c b/src/main/event.c index 0f200969..d99d954d 100644 --- a/src/main/event.c +++ b/src/main/event.c @@ -74,7 +74,7 @@ invalid_event_id(int id) } int -register_event(char *name) +register_event(const char *name) { int id = get_event_id(name); struct event *event; diff --git a/src/main/event.h b/src/main/event.h index b63fcdb0..f418eb0e 100644 --- a/src/main/event.h +++ b/src/main/event.h @@ -60,7 +60,7 @@ typedef enum evhook_status (*event_hook_T)(va_list ap, void *data); /* This registers an event of name @name, allocating an id number for it. */ /* The function returns the id or negative number upon error. */ -int register_event(char *name); +int register_event(const char *name); /* This unregisters an event number @event, freeing the resources it * occupied, chain of associated hooks and unallocating the event id for @@ -76,7 +76,7 @@ void unregister_event_hook(int id, event_hook_T callback); /*** Interface for table driven event hooks maintainance */ struct event_hook_info { - char *name; + const char *name; int priority; event_hook_T callback; void *data;