mirror of
				https://github.com/lunarmodules/luasocket.git
				synced 2025-10-31 02:15:38 +01:00 
			
		
		
		
	Returning a function.
This commit is contained in:
		| @@ -70,12 +70,6 @@ static t_opt opt[] = { | |||||||
|     {NULL,          NULL} |     {NULL,          NULL} | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /* functions in library namespace */ |  | ||||||
| static luaL_reg func[] = { |  | ||||||
|     {"unix", global_create}, |  | ||||||
|     {NULL, NULL} |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /*-------------------------------------------------------------------------*\ | /*-------------------------------------------------------------------------*\ | ||||||
| * Initializes module | * Initializes module | ||||||
| \*-------------------------------------------------------------------------*/ | \*-------------------------------------------------------------------------*/ | ||||||
| @@ -89,7 +83,7 @@ int luaopen_socketunix(lua_State *L) { | |||||||
|     aux_add2group(L, "unix{client}", "unix{any}"); |     aux_add2group(L, "unix{client}", "unix{any}"); | ||||||
|     aux_add2group(L, "unix{server}", "unix{any}"); |     aux_add2group(L, "unix{server}", "unix{any}"); | ||||||
|     /* define library functions */ |     /* define library functions */ | ||||||
|     luaL_openlib(L, "socket", func, 0);  |     lua_pushcfunction(L, global_create);  | ||||||
|     return 1; |     return 1; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user