mirror of https://github.com/rusefi/lua.git
luaL_setfield does a non-raw set
This commit is contained in:
parent
68548a02d3
commit
3b828d9e48
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lauxlib.c,v 1.145 2005/08/17 19:05:04 roberto Exp roberto $
|
** $Id: lauxlib.c,v 1.146 2005/08/17 20:09:31 roberto Exp roberto $
|
||||||
** Auxiliary functions for building Lua libraries
|
** Auxiliary functions for building Lua libraries
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -388,9 +388,8 @@ LUALIB_API const char *luaL_setfield (lua_State *L, int idx,
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lua_pushstring(L, fname);
|
lua_pushvalue(L, -2); /* move value to the top */
|
||||||
lua_pushvalue(L, -3); /* move value to the top */
|
lua_setfield(L, -2, fname); /* set last field */
|
||||||
lua_rawset(L, -3); /* set last field */
|
|
||||||
lua_pop(L, 2); /* remove value and table */
|
lua_pop(L, 2); /* remove value and table */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue