[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug in building and installing luasocket
- From: Paul Ducklin <duck@...>
- Date: Thu, 31 May 2007 20:36:59 +1000
>AFAICT from the sources socket/core.so...you
>can already statically link the so file to your lua >interpreter. All you have to modify is lua.c so
>that it puts luaopen_socket_core...in preload
What I am suggesting is a little different, viz: that the TCP/UDP core of LuaSocket be made into a package which can be require()d independently (and in advance of) the higher-protocol-level code in socket.lua and others.
At the moment, if you statically link the C core and call luaopen_socket_core() then you end up with a loaded package called 'socket' containing a subset of LuaSocket. This is great, except that you can't then decide to load the higher level stuff because when you require('socket'), nothing happens because 'socket' is already loaded :-)
socket/core.so could, IMO, perfectly usefully be a package in its own right. You could then load the higher-level Lua or not to suit yourself.