summary refs log tree commit diff stats
path: root/plugins/lua
diff options
context:
space:
mode:
authormniip <mniip@mniip.com>2016-04-04 04:53:32 +0300
committerPatrick Griffis <tingping@tingping.se>2016-04-07 18:27:07 -0700
commitbc9a59d2646b8db2cf6f690b6e4ac30bfbd4772a (patch)
tree23a331dcda0851dcc2a65e1acb7147803d8e990c /plugins/lua
parent5699bf9e659e5c8094b46a491d451bfc5342fc53 (diff)
lua: Replace some pushnumbers with pushintegers
Diffstat (limited to 'plugins/lua')
-rw-r--r--plugins/lua/lua.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c
index 00bedbe5..5ed206c5 100644
--- a/plugins/lua/lua.c
+++ b/plugins/lua/lua.c
@@ -217,7 +217,7 @@ static int api_hexchat_send_modes(lua_State *L)
 
 static int api_hexchat_nickcmp(lua_State *L)
 {
-	lua_pushnumber(L, hexchat_nickcmp(ph, luaL_checkstring(L, 1), luaL_checkstring(L, 2)));
+	lua_pushinteger(L, hexchat_nickcmp(ph, luaL_checkstring(L, 1), luaL_checkstring(L, 2)));
 	return 1;
 }
 
@@ -887,7 +887,7 @@ static int api_hexchat_pluginprefs_meta_index(lua_State *L)
 	r = hexchat_pluginpref_get_int(h, key);
 	if(r != -1)
 	{
-		lua_pushnumber(L, r);
+		lua_pushinteger(L, r);
 		return 1;
 	}
 	if(hexchat_pluginpref_get_str(h, key, str))
@@ -946,7 +946,7 @@ static int api_hexchat_pluginprefs_meta_pairs_closure(lua_State *L)
 		r = hexchat_pluginpref_get_int(h, key);
 		if(r != -1)
 		{
-			lua_pushnumber(L, r);
+			lua_pushinteger(L, r);
 			return 2;
 		}
 		if(hexchat_pluginpref_get_str(h, key, str))
@@ -986,7 +986,7 @@ static int api_attrs_meta_index(lua_State *L)
 	char const *key = luaL_checkstring(L, 2);
 	if(!strcmp(key, "server_time_utc"))
 	{
-		lua_pushnumber(L, attrs->server_time_utc);
+		lua_pushinteger(L, attrs->server_time_utc);
 		return 1;
 	}
 	else
@@ -1104,15 +1104,15 @@ static int luaopen_hexchat(lua_State *L)
 	lua_newtable(L);
 	luaL_setfuncs(L, api_hexchat, 0);
 
-	lua_pushnumber(L, HEXCHAT_PRI_HIGHEST); lua_setfield(L, -2, "PRI_HIGHEST");
-	lua_pushnumber(L, HEXCHAT_PRI_HIGH); lua_setfield(L, -2, "PRI_HIGH");
-	lua_pushnumber(L, HEXCHAT_PRI_NORM); lua_setfield(L, -2, "PRI_NORM");
-	lua_pushnumber(L, HEXCHAT_PRI_LOW); lua_setfield(L, -2, "PRI_LOW");
-	lua_pushnumber(L, HEXCHAT_PRI_LOWEST); lua_setfield(L, -2, "PRI_LOWEST");
-	lua_pushnumber(L, HEXCHAT_EAT_NONE); lua_setfield(L, -2, "EAT_NONE");
-	lua_pushnumber(L, HEXCHAT_EAT_HEXCHAT); lua_setfield(L, -2, "EAT_HEXCHAT");
-	lua_pushnumber(L, HEXCHAT_EAT_PLUGIN); lua_setfield(L, -2, "EAT_PLUGIN");
-	lua_pushnumber(L, HEXCHAT_EAT_ALL); lua_setfield(L, -2, "EAT_ALL");
+	lua_pushinteger(L, HEXCHAT_PRI_HIGHEST); lua_setfield(L, -2, "PRI_HIGHEST");
+	lua_pushinteger(L, HEXCHAT_PRI_HIGH); lua_setfield(L, -2, "PRI_HIGH");
+	lua_pushinteger(L, HEXCHAT_PRI_NORM); lua_setfield(L, -2, "PRI_NORM");
+	lua_pushinteger(L, HEXCHAT_PRI_LOW); lua_setfield(L, -2, "PRI_LOW");
+	lua_pushinteger(L, HEXCHAT_PRI_LOWEST); lua_setfield(L, -2, "PRI_LOWEST");
+	lua_pushinteger(L, HEXCHAT_EAT_NONE); lua_setfield(L, -2, "EAT_NONE");
+	lua_pushinteger(L, HEXCHAT_EAT_HEXCHAT); lua_setfield(L, -2, "EAT_HEXCHAT");
+	lua_pushinteger(L, HEXCHAT_EAT_PLUGIN); lua_setfield(L, -2, "EAT_PLUGIN");
+	lua_pushinteger(L, HEXCHAT_EAT_ALL); lua_setfield(L, -2, "EAT_ALL");
 
 	lua_newtable(L);
 	lua_newtable(L);