diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-09-21 10:37:28 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-10-10 15:16:45 +0200 |
commit | 0b615dae073c14078c0a92b8aaed1da24575afcf (patch) | |
tree | d46cec554e489a92ed0d81ea6c5780d9c27dd87e /src/nvim/lua/executor.h | |
parent | 11ec53e558b547bbe49c93d206a8e4ab4247511b (diff) | |
download | rneovim-0b615dae073c14078c0a92b8aaed1da24575afcf.tar.gz rneovim-0b615dae073c14078c0a92b8aaed1da24575afcf.tar.bz2 rneovim-0b615dae073c14078c0a92b8aaed1da24575afcf.zip |
api: multiple decoration providers at once
Diffstat (limited to 'src/nvim/lua/executor.h')
-rw-r--r-- | src/nvim/lua/executor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.h b/src/nvim/lua/executor.h index 6599b44584..1d7a15d9aa 100644 --- a/src/nvim/lua/executor.h +++ b/src/nvim/lua/executor.h @@ -24,6 +24,15 @@ EXTERN LuaRef nlua_empty_dict_ref INIT(= LUA_NOREF); memcpy(&err_->msg[0], s, sizeof(s)); \ } while (0) +#define NLUA_CLEAR_REF(x) \ + do { \ + /* Take the address to avoid double evaluation. #1375 */ \ + if ((x) != LUA_NOREF) { \ + api_free_luaref(x); \ + (x) = LUA_NOREF; \ + } \ + } while (0) + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/executor.h.generated.h" #endif |