aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-11-05 00:26:33 +0300
committerZyX <kp-pav@yandex.ru>2017-03-29 10:08:06 +0300
commit9ed9af7e11e3a707f65abfeb1d02b029e39241ea (patch)
tree057f80562cc1009ab9d1b2d4502a982c57da291c
parent56e51033abf00d66e9c6f9412e8f57c9a24b86ae (diff)
downloadrneovim-9ed9af7e11e3a707f65abfeb1d02b029e39241ea.tar.gz
rneovim-9ed9af7e11e3a707f65abfeb1d02b029e39241ea.tar.bz2
rneovim-9ed9af7e11e3a707f65abfeb1d02b029e39241ea.zip
eval/typval: More `const` qualifiers in `tv_dict*` function signatures
-rw-r--r--src/nvim/eval/typval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index 4adc31d10a..57025250d4 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -1096,7 +1096,7 @@ dictitem_T *tv_dict_find(const dict_T *const d, const char *const key,
/// @param[in] key Key to find in dictionary.
///
/// @return Dictionary item.
-varnumber_T tv_dict_get_number(dict_T *const d, const char *const key)
+varnumber_T tv_dict_get_number(const dict_T *const d, const char *const key)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
{
dictitem_T *const di = tv_dict_find(d, key, -1);
@@ -1116,7 +1116,7 @@ varnumber_T tv_dict_get_number(dict_T *const d, const char *const key)
/// @return NULL if key does not exist, empty string in case of type error,
/// string item value otherwise. If returned value is not NULL, it may
/// be allocated depending on `save` argument.
-char *tv_dict_get_string(dict_T *const d, const char *const key,
+char *tv_dict_get_string(const dict_T *const d, const char *const key,
const bool save)
FUNC_ATTR_WARN_UNUSED_RESULT
{
@@ -1136,11 +1136,11 @@ char *tv_dict_get_string(dict_T *const d, const char *const key,
///
/// @return NULL if key does not exist, empty string in case of type error,
/// string item value otherwise.
-const char *tv_dict_get_string_buf(dict_T *const d, const char *const key,
+const char *tv_dict_get_string_buf(const dict_T *const d, const char *const key,
char *const numbuf)
FUNC_ATTR_WARN_UNUSED_RESULT
{
- dictitem_T *const di = tv_dict_find(d, key, -1);
+ const dictitem_T *const di = tv_dict_find(d, key, -1);
if (di == NULL) {
return NULL;
}