aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/unix.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/unix.c b/src/unix.c
index 217a600..3071608 100644
--- a/src/unix.c
+++ b/src/unix.c
@@ -70,12 +70,6 @@ static t_opt opt[] = {
70 {NULL, NULL} 70 {NULL, NULL}
71}; 71};
72 72
73/* functions in library namespace */
74static luaL_reg func[] = {
75 {"unix", global_create},
76 {NULL, NULL}
77};
78
79/*-------------------------------------------------------------------------*\ 73/*-------------------------------------------------------------------------*\
80* Initializes module 74* Initializes module
81\*-------------------------------------------------------------------------*/ 75\*-------------------------------------------------------------------------*/
@@ -89,7 +83,7 @@ int luaopen_socketunix(lua_State *L) {
89 aux_add2group(L, "unix{client}", "unix{any}"); 83 aux_add2group(L, "unix{client}", "unix{any}");
90 aux_add2group(L, "unix{server}", "unix{any}"); 84 aux_add2group(L, "unix{server}", "unix{any}");
91 /* define library functions */ 85 /* define library functions */
92 luaL_openlib(L, "socket", func, 0); 86 lua_pushcfunction(L, global_create);
93 return 1; 87 return 1;
94} 88}
95 89