diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-10-10 18:31:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 18:31:46 +0200 |
commit | f7cc3ae0b7b8ce67294c00729d278362ad60a4f0 (patch) | |
tree | 5b601432a0b2d835bb31a8d2776d74bfd9b885b0 /src/nvim/lua/executor.h | |
parent | 405044a41206e325c4f3ecaa6c62ed8f4bb32abe (diff) | |
parent | 6bf414c0d74ed6f2c573e87290830bade4330c9a (diff) | |
download | rneovim-f7cc3ae0b7b8ce67294c00729d278362ad60a4f0.tar.gz rneovim-f7cc3ae0b7b8ce67294c00729d278362ad60a4f0.tar.bz2 rneovim-f7cc3ae0b7b8ce67294c00729d278362ad60a4f0.zip |
Merge pull request #13038 from bfredl/multiluahl
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 |