aboutsummaryrefslogtreecommitdiff
path: root/src/auxiliar.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-08-23 05:53:14 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-08-23 05:53:14 +0000
commit773e35ced30fa2c03ddb2a332bf8a9aebb56aa44 (patch)
tree03e8e9a4bd64b9424006315c8e720c3f2841a751 /src/auxiliar.c
parent5e8ae76248ed31496dc6fef7855498a0479159ed (diff)
downloadluasocket-773e35ced30fa2c03ddb2a332bf8a9aebb56aa44.tar.gz
luasocket-773e35ced30fa2c03ddb2a332bf8a9aebb56aa44.tar.bz2
luasocket-773e35ced30fa2c03ddb2a332bf8a9aebb56aa44.zip
Compiled on Windows. Fixed a bunch of stuff. Almost ready to release.
Implemented a nice dispatcher! Non-blocking check-links and forward server use the dispatcher.
Diffstat (limited to 'src/auxiliar.c')
-rw-r--r--src/auxiliar.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/auxiliar.c b/src/auxiliar.c
index 2ebcdd6..b228785 100644
--- a/src/auxiliar.c
+++ b/src/auxiliar.c
@@ -127,6 +127,9 @@ void aux_setclass(lua_State *L, const char *classname, int objidx) {
127* otherwise 127* otherwise
128\*-------------------------------------------------------------------------*/ 128\*-------------------------------------------------------------------------*/
129void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) { 129void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) {
130#if 0
131 return lua_touserdata(L, objidx);
132#else
130 if (!lua_getmetatable(L, objidx)) 133 if (!lua_getmetatable(L, objidx))
131 return NULL; 134 return NULL;
132 lua_pushstring(L, groupname); 135 lua_pushstring(L, groupname);
@@ -138,6 +141,7 @@ void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) {
138 lua_pop(L, 2); 141 lua_pop(L, 2);
139 return lua_touserdata(L, objidx); 142 return lua_touserdata(L, objidx);
140 } 143 }
144#endif
141} 145}
142 146
143/*-------------------------------------------------------------------------*\ 147/*-------------------------------------------------------------------------*\
@@ -145,5 +149,9 @@ void *aux_getgroupudata(lua_State *L, const char *groupname, int objidx) {
145* otherwise 149* otherwise
146\*-------------------------------------------------------------------------*/ 150\*-------------------------------------------------------------------------*/
147void *aux_getclassudata(lua_State *L, const char *classname, int objidx) { 151void *aux_getclassudata(lua_State *L, const char *classname, int objidx) {
152#if 0
153 return lua_touserdata(L, objidx);
154#else
148 return luaL_checkudata(L, objidx, classname); 155 return luaL_checkudata(L, objidx, classname);
156#endif
149} 157}