msgpack: Replace FUNC_ATTR_DEFERRED by FUNC_ATTR_ASYNC

API functions exposed via msgpack-rpc now fall into two categories:

- async functions, which are executed as soon as the request is parsed
- sync functions, which are invoked in nvim main loop when processing the
  `K_EVENT special key

Only a few functions which can be safely executed in any context are marked as
async.
This commit is contained in:
Thiago de Arruda
2015-07-24 09:55:31 -03:00
parent b13011ff47
commit ccdeb91e12
10 changed files with 14 additions and 40 deletions

View File

@@ -54,7 +54,6 @@ ArrayOf(Integer, 2) window_get_cursor(Window window, Error *err)
/// @param pos the (row, col) tuple representing the new position
/// @param[out] err Details of an error that may have occurred
void window_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
FUNC_ATTR_DEFERRED
{
win_T *win = find_window_by_handle(window, err);
@@ -118,7 +117,6 @@ Integer window_get_height(Window window, Error *err)
/// @param height the new height in rows
/// @param[out] err Details of an error that may have occurred
void window_set_height(Window window, Integer height, Error *err)
FUNC_ATTR_DEFERRED
{
win_T *win = find_window_by_handle(window, err);
@@ -162,7 +160,6 @@ Integer window_get_width(Window window, Error *err)
/// @param width the new width in columns
/// @param[out] err Details of an error that may have occurred
void window_set_width(Window window, Integer width, Error *err)
FUNC_ATTR_DEFERRED
{
win_T *win = find_window_by_handle(window, err);
@@ -208,7 +205,6 @@ Object window_get_var(Window window, String name, Error *err)
/// @param[out] err Details of an error that may have occurred
/// @return The old value
Object window_set_var(Window window, String name, Object value, Error *err)
FUNC_ATTR_DEFERRED
{
win_T *win = find_window_by_handle(window, err);
@@ -244,7 +240,6 @@ Object window_get_option(Window window, String name, Error *err)
/// @param value The option value
/// @param[out] err Details of an error that may have occurred
void window_set_option(Window window, String name, Object value, Error *err)
FUNC_ATTR_DEFERRED
{
win_T *win = find_window_by_handle(window, err);