提交 258e28dd authored 作者: Michael Jerris's avatar Michael Jerris

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
上级 a7cf447f
...@@ -886,7 +886,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, cha ...@@ -886,7 +886,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, cha
\param key the key to retrieve \param key the key to retrieve
\return a pointer to the data held in the key \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 ///\defgroup timer Timer Functions
......
...@@ -139,7 +139,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void); ...@@ -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) \param subclass_name the subclass name for custom event (only valid when event_id is SWITCH_EVENT_CUSTOM)
\return SWITCH_STATUS_SUCCESS on success \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 \brief Set the priority of an event
......
...@@ -3504,7 +3504,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, cha ...@@ -3504,7 +3504,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, cha
return SWITCH_STATUS_SUCCESS; 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); return apr_hash_get(hash, key, APR_HASH_KEY_STRING);
} }
......
...@@ -423,7 +423,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool) ...@@ -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_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event,
switch_event_types_t event_id, switch_event_types_t event_id,
char *subclass_name) const char *subclass_name)
{ {
if (event_id != SWITCH_EVENT_CUSTOM && subclass_name) { if (event_id != SWITCH_EVENT_CUSTOM && subclass_name) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论