aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/strings.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r--include/asterisk/strings.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 43ba361f4..ae58af3ef 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -281,7 +281,7 @@ int attribute_pure ast_false(const char *val);
* string. It will also place a space in the result buffer in between each
* string from 'w'.
*/
-void ast_join(char *s, size_t len, char * const w[]);
+void ast_join(char *s, size_t len, const char * const w[]);
/*
\brief Parse a time (integer) string.
@@ -454,7 +454,7 @@ void ast_str_trim_blanks(struct ast_str *buf),
* \param buf A pointer to the ast_str structure.
*/
AST_INLINE_API(
-size_t attribute_pure ast_str_strlen(struct ast_str *buf),
+size_t attribute_pure ast_str_strlen(const struct ast_str *buf),
{
return buf->__AST_STR_USED;
}
@@ -465,7 +465,7 @@ size_t attribute_pure ast_str_strlen(struct ast_str *buf),
* \retval Current maximum length of the buffer.
*/
AST_INLINE_API(
-size_t attribute_pure ast_str_size(struct ast_str *buf),
+size_t attribute_pure ast_str_size(const struct ast_str *buf),
{
return buf->__AST_STR_LEN;
}
@@ -476,9 +476,13 @@ size_t attribute_pure ast_str_size(struct ast_str *buf),
* \retval A pointer to the enclosed string.
*/
AST_INLINE_API(
-char * attribute_pure ast_str_buffer(struct ast_str *buf),
+char * attribute_pure ast_str_buffer(const struct ast_str *buf),
{
- return buf->__AST_STR_STR;
+ /* for now, cast away the const qualifier on the pointer
+ * being returned; eventually, it should become truly const
+ * and only be modified via accessor functions
+ */
+ return (char *) buf->__AST_STR_STR;
}
)