From 0b615dae073c14078c0a92b8aaed1da24575afcf Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Mon, 21 Sep 2020 10:37:28 +0200 Subject: api: multiple decoration providers at once --- src/nvim/lua/executor.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/lua/executor.h') 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 -- cgit