diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-06-20 14:40:57 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-08-31 21:57:06 +0200 |
commit | e536abc1e1f59d1ac012e1be576bf55175e95443 (patch) | |
tree | c9ba9c5772f4e0551ccf309f1ac269678ebf77a8 /src/nvim/api/vim.c | |
parent | 7e2348f2b1b487c875bbcf6c6711a276f9063040 (diff) | |
download | rneovim-e536abc1e1f59d1ac012e1be576bf55175e95443.tar.gz rneovim-e536abc1e1f59d1ac012e1be576bf55175e95443.tar.bz2 rneovim-e536abc1e1f59d1ac012e1be576bf55175e95443.zip |
api: Allow blacklist functions that shouldn't be accesible from eval
Blacklist deprecated functions and functions depending on channel_id
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index d4d2b72429..aa86e61e29 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -583,6 +583,7 @@ void vim_set_current_tabpage(Tabpage tabpage, Error *err) /// @param channel_id The channel id (passed automatically by the dispatcher) /// @param event The event type string void vim_subscribe(uint64_t channel_id, String event) + FUNC_API_NOEVAL { size_t length = (event.size < METHOD_MAXLEN ? event.size : METHOD_MAXLEN); char e[METHOD_MAXLEN + 1]; @@ -596,6 +597,7 @@ void vim_subscribe(uint64_t channel_id, String event) /// @param channel_id The channel id (passed automatically by the dispatcher) /// @param event The event type string void vim_unsubscribe(uint64_t channel_id, String event) + FUNC_API_NOEVAL { size_t length = (event.size < METHOD_MAXLEN ? event.size : @@ -624,7 +626,7 @@ Dictionary vim_get_color_map(void) Array vim_get_api_info(uint64_t channel_id) - FUNC_API_ASYNC + FUNC_API_ASYNC FUNC_API_NOEVAL { Array rv = ARRAY_DICT_INIT; |