Diff

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
line wrap: on
line diff
--- a/util-src/windows.c	Tue Sep 16 21:56:18 2014 +0200
+++ b/util-src/windows.c	Wed Sep 17 02:23:17 2014 +0200
@@ -83,8 +83,7 @@
 LUALIB_API int luaopen_util_windows(lua_State *L) {
 	lua_newtable(L);
 	luaL_register(L, NULL, Reg);
-	lua_pushliteral(L, "version");			/** version */
 	lua_pushliteral(L, "-3.14");
-	lua_settable(L,-3);
+	lua_setfield(L, -2, "version");
 	return 1;
 }