mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.1721: Build failure on Windows with dynamic lua
Problem: Build failure on Windows with dynamic lua (after 9.0.1719) Solution: move definition further down in if_lua closes: #12811 closes: #12814 closes: #12818 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
committed by
Christian Brabandt
parent
a456b12011
commit
4112acae08
41
src/if_lua.c
41
src/if_lua.c
@@ -73,27 +73,6 @@ static const char LUA___CALL[] = "__call";
|
|||||||
|
|
||||||
static const char LUAVIM_UDATA_CACHE[] = "luaV_udata_cache";
|
static const char LUAVIM_UDATA_CACHE[] = "luaV_udata_cache";
|
||||||
|
|
||||||
static void LUAV_INLINE
|
|
||||||
luaV_getudata(lua_State *L, void *v)
|
|
||||||
{
|
|
||||||
lua_pushlightuserdata(L, (void *) LUAVIM_UDATA_CACHE);
|
|
||||||
lua_rawget(L, LUA_REGISTRYINDEX); // now the cache table is at the top of the stack
|
|
||||||
lua_pushlightuserdata(L, v);
|
|
||||||
lua_rawget(L, -2);
|
|
||||||
lua_remove(L, -2); // remove the cache table from the stack
|
|
||||||
}
|
|
||||||
|
|
||||||
static void LUAV_INLINE
|
|
||||||
luaV_setudata(lua_State *L, void *v)
|
|
||||||
{
|
|
||||||
lua_pushlightuserdata(L, (void *) LUAVIM_UDATA_CACHE);
|
|
||||||
lua_rawget(L, LUA_REGISTRYINDEX); // cache table is at -1
|
|
||||||
lua_pushlightuserdata(L, v); // ...now at -2
|
|
||||||
lua_pushvalue(L, -3); // copy the userdata (cache at -3)
|
|
||||||
lua_rawset(L, -3); // consumes two stack items
|
|
||||||
lua_pop(L, 1); // and remove the cache table
|
|
||||||
}
|
|
||||||
|
|
||||||
#define luaV_getfield(L, s) \
|
#define luaV_getfield(L, s) \
|
||||||
lua_pushlightuserdata((L), (void *)(s)); \
|
lua_pushlightuserdata((L), (void *)(s)); \
|
||||||
lua_rawget((L), LUA_REGISTRYINDEX)
|
lua_rawget((L), LUA_REGISTRYINDEX)
|
||||||
@@ -511,6 +490,26 @@ luaL_typeerror(lua_State *L, int narg, const char *tname)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static LUAV_INLINE void
|
||||||
|
luaV_getudata(lua_State *L, void *v)
|
||||||
|
{
|
||||||
|
lua_pushlightuserdata(L, (void *) LUAVIM_UDATA_CACHE);
|
||||||
|
lua_rawget(L, LUA_REGISTRYINDEX); // now the cache table is at the top of the stack
|
||||||
|
lua_pushlightuserdata(L, v);
|
||||||
|
lua_rawget(L, -2);
|
||||||
|
lua_remove(L, -2); // remove the cache table from the stack
|
||||||
|
}
|
||||||
|
|
||||||
|
static LUAV_INLINE void
|
||||||
|
luaV_setudata(lua_State *L, void *v)
|
||||||
|
{
|
||||||
|
lua_pushlightuserdata(L, (void *) LUAVIM_UDATA_CACHE);
|
||||||
|
lua_rawget(L, LUA_REGISTRYINDEX); // cache table is at -1
|
||||||
|
lua_pushlightuserdata(L, v); // ...now at -2
|
||||||
|
lua_pushvalue(L, -3); // copy the userdata (cache at -3)
|
||||||
|
lua_rawset(L, -3); // consumes two stack items
|
||||||
|
lua_pop(L, 1); // and remove the cache table
|
||||||
|
}
|
||||||
|
|
||||||
// ======= Internal =======
|
// ======= Internal =======
|
||||||
|
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1721,
|
||||||
/**/
|
/**/
|
||||||
1720,
|
1720,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user