Comparison

util-src/windows.c @ 6412:0e94f89d0e62

util-src/*.c: Use the more concise lua_setfield
author Kim Alvefur <zash@zash.se>
date Wed, 17 Sep 2014 02:23:17 +0200
parent 6411:6c8f6364bc48
child 6413:a552f4170aed
comparison
equal deleted inserted replaced
6411:6c8f6364bc48 6412:0e94f89d0e62
81 }; 81 };
82 82
83 LUALIB_API int luaopen_util_windows(lua_State *L) { 83 LUALIB_API int luaopen_util_windows(lua_State *L) {
84 lua_newtable(L); 84 lua_newtable(L);
85 luaL_register(L, NULL, Reg); 85 luaL_register(L, NULL, Reg);
86 lua_pushliteral(L, "version"); /** version */
87 lua_pushliteral(L, "-3.14"); 86 lua_pushliteral(L, "-3.14");
88 lua_settable(L,-3); 87 lua_setfield(L, -2, "version");
89 return 1; 88 return 1;
90 } 89 }