From 258e28dd118b7468f82e0ed2d11c59fd8613347e Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 14 Feb 2007 03:22:43 +0000 Subject: [PATCH] constification for switch_core_hash_find and switch_event_create_subclass git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4251 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_core.h | 2 +- src/include/switch_event.h | 2 +- src/switch_core.c | 2 +- src/switch_event.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/switch_core.h b/src/include/switch_core.h index 5b783f2aff..02f011408a 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -886,7 +886,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, cha \param key the key to retrieve \return a pointer to the data held in the key */ -SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, char *key); +SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, const char *key); ///\} ///\defgroup timer Timer Functions diff --git a/src/include/switch_event.h b/src/include/switch_event.h index 05254128fc..97c9c72641 100644 --- a/src/include/switch_event.h +++ b/src/include/switch_event.h @@ -139,7 +139,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void); \param subclass_name the subclass name for custom event (only valid when event_id is SWITCH_EVENT_CUSTOM) \return SWITCH_STATUS_SUCCESS on success */ -SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id, char *subclass_name); +SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id, const char *subclass_name); /*! \brief Set the priority of an event diff --git a/src/switch_core.c b/src/switch_core.c index 4d73b4acce..4c473d0186 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -3504,7 +3504,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, cha return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, char *key) +SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, const char *key) { return apr_hash_get(hash, key, APR_HASH_KEY_STRING); } diff --git a/src/switch_event.c b/src/switch_event.c index fe72863ca4..e4373e29c2 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -423,7 +423,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool) SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id, - char *subclass_name) + const char *subclass_name) { if (event_id != SWITCH_EVENT_CUSTOM && subclass_name) {