aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval/typval.c5
-rw-r--r--test/unit/eval/typval_spec.lua3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index 48ff3ab623..da58cf5ca9 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -825,8 +825,7 @@ void tv_dict_watcher_add(dict_T *const dict, const char *const key_pattern,
/// @param[in] cb2 Second callback to check.
///
/// @return True if they are equal, false otherwise.
-static bool tv_callback_equal(const Callback *const cb1,
- const Callback *const cb2)
+bool tv_callback_equal(const Callback *const cb1, const Callback *const cb2)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
if (cb1->type != cb2->type) {
@@ -1240,7 +1239,7 @@ const char *tv_dict_get_string_buf(const dict_T *const d, const char *const key,
bool tv_dict_get_callback(dict_T *const d,
const char *const key, const ptrdiff_t key_len,
Callback *const result)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
+ FUNC_ATTR_NONNULL_ARG(2, 4) FUNC_ATTR_WARN_UNUSED_RESULT
{
result->type = kCallbackNone;
diff --git a/test/unit/eval/typval_spec.lua b/test/unit/eval/typval_spec.lua
index 7436115945..3a4ef0cb92 100644
--- a/test/unit/eval/typval_spec.lua
+++ b/test/unit/eval/typval_spec.lua
@@ -1736,8 +1736,7 @@ describe('typval.c', function()
return cb_lua, ret
end
itp('works with NULL dict', function()
- eq({{type='none'}, true},
- {tv_dict_get_callback(nil, nil, 0)})
+ eq({{type='none'}, true}, {tv_dict_get_callback(nil, '')})
end)
itp('works', function()
local lua_d = {