api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}

- Move helpers that are specific to API types to api/private/helpers.{c,h}
- Include headers with generated declarations
- Delete unused macros
This commit is contained in:
Thiago de Arruda
2014-09-09 09:36:14 -03:00
parent 2792a0e33c
commit cac24cb06d
11 changed files with 121 additions and 196 deletions

View File

@@ -84,7 +84,6 @@
#include "nvim/os/channel.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/vim.h"
#include "nvim/os/msgpack_rpc_helpers.h"
#include "nvim/os/dl.h"
#include "nvim/os/provider.h"
@@ -12725,7 +12724,7 @@ static void f_send_call(typval_T *argvars, typval_T *rettv)
_("Error converting the call result"));
}
msgpack_rpc_free_object(result);
api_free_object(result);
}
// "send_event()" function
@@ -19239,7 +19238,7 @@ static void script_host_eval(char *method, typval_T *argvars, typval_T *rettv)
Error err = {.set = false};
object_to_vim(result, rettv, &err);
msgpack_rpc_free_object(result);
api_free_object(result);
if (err.set) {
EMSG("Error converting value back to vim");