From 0fc1cd534a7c73f4a5d9c99f0132f55c17c199a6 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 12 Jan 2008 07:14:48 +0000 Subject: [PATCH] constify functions git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7186 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_event.h | 8 ++++---- src/switch_event.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/include/switch_event.h b/src/include/switch_event.h index 10140185dc..5b4f7664c5 100644 --- a/src/include/switch_event.h +++ b/src/include/switch_event.h @@ -211,7 +211,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_ \param user_data optional private data to pass to the event handlers \return */ -SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data); +SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(const char *file, const char *func, int line, switch_event_t **event, void *user_data); /*! \brief Bind an event callback to a specific event @@ -222,7 +222,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun \param user_data optional user specific data to pass whenever the callback is invoked \return SWITCH_STATUS_SUCCESS if the event was binded */ -SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, +SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, const char *subclass_name, switch_event_callback_t callback, void *user_data); /*! @@ -238,7 +238,7 @@ SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event); \param type the event id to return \return SWITCH_STATUS_SUCCESS if there was a match */ -SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types_t *type); +SWITCH_DECLARE(switch_status_t) switch_name_event(const char *name, switch_event_types_t *type); /*! \brief Reserve a subclass name for private use with a custom event @@ -248,7 +248,7 @@ SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types \note There is nothing to enforce this but I reccommend using module::event_name for the subclass names */ -SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name); +SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(const char *owner, const char *subclass_name); /*! \brief Render a string representation of an event sutable for printing or network transport diff --git a/src/switch_event.c b/src/switch_event.c index 7156c0cca9..d5411a8e1d 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -289,7 +289,7 @@ SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event) return EVENT_NAMES[event]; } -SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types_t *type) +SWITCH_DECLARE(switch_status_t) switch_name_event(const char *name, switch_event_types_t *type) { switch_event_types_t x; switch_assert(BLOCK != NULL); @@ -305,7 +305,7 @@ SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types return SWITCH_STATUS_FALSE; } -SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name) +SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(const char *owner, const char *subclass_name) { switch_event_subclass_t *subclass; @@ -861,7 +861,7 @@ SWITCH_DECLARE(switch_xml_t) switch_event_xmlize(switch_event_t *event, const ch return xml; } -SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data) +SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(const char *file, const char *func, int line, switch_event_t **event, void *user_data) { switch_time_exp_t tm; char date[80] = ""; @@ -937,7 +937,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, +SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, const char *subclass_name, switch_event_callback_t callback, void *user_data) { switch_event_node_t *event_node;