aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2011-06-14 01:40:11 +0200
committerSam Roberts <vieuxtech@gmail.com>2012-04-11 13:33:34 -0700
commit5065a2585c6d865f04bf7b18c4c21728ab97d8e9 (patch)
tree4a16d2c28695167465594c65fa2e2d83486a9d02 /src
parent923eef192925cae29223974dbf1addd59b4b0f28 (diff)
downloadluasocket-5065a2585c6d865f04bf7b18c4c21728ab97d8e9.tar.gz
luasocket-5065a2585c6d865f04bf7b18c4c21728ab97d8e9.tar.bz2
luasocket-5065a2585c6d865f04bf7b18c4c21728ab97d8e9.zip
dns: Rename toip6() to getaddrinfo() since the old name is misleading
Diffstat (limited to 'src')
-rw-r--r--src/inet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inet.c b/src/inet.c
index 95b7af3..758dbf8 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -16,7 +16,7 @@
16* Internal function prototypes. 16* Internal function prototypes.
17\*=========================================================================*/ 17\*=========================================================================*/
18static int inet_global_toip(lua_State *L); 18static int inet_global_toip(lua_State *L);
19static int inet_global_toip6(lua_State *L); 19static int inet_global_getaddrinfo(lua_State *L);
20static int inet_global_tohostname(lua_State *L); 20static int inet_global_tohostname(lua_State *L);
21static void inet_pushresolved(lua_State *L, struct hostent *hp); 21static void inet_pushresolved(lua_State *L, struct hostent *hp);
22static int inet_global_gethostname(lua_State *L); 22static int inet_global_gethostname(lua_State *L);
@@ -24,7 +24,7 @@ static int inet_global_gethostname(lua_State *L);
24/* DNS functions */ 24/* DNS functions */
25static luaL_reg func[] = { 25static luaL_reg func[] = {
26 { "toip", inet_global_toip}, 26 { "toip", inet_global_toip},
27 { "toip6", inet_global_toip6}, 27 { "getaddrinfo", inet_global_getaddrinfo},
28 { "tohostname", inet_global_tohostname}, 28 { "tohostname", inet_global_tohostname},
29 { "gethostname", inet_global_gethostname}, 29 { "gethostname", inet_global_gethostname},
30 { NULL, NULL} 30 { NULL, NULL}
@@ -97,7 +97,7 @@ static int inet_global_toip(lua_State *L)
97 return 2; 97 return 2;
98} 98}
99 99
100static int inet_global_toip6(lua_State *L) 100static int inet_global_getaddrinfo(lua_State *L)
101{ 101{
102 const char *hostname = luaL_checkstring(L, 1); 102 const char *hostname = luaL_checkstring(L, 1);
103 struct addrinfo *iterator = NULL, *resolved = NULL; 103 struct addrinfo *iterator = NULL, *resolved = NULL;