lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



BTW, anyone else has anything to report? If so, speak now or
forever hold your peace. Well, at least until 2.0.3.

I have a couple of things, but they're just reiterations of earlier stuff.

1. It really would be nice to be able to compile the core C part of LuaSocket into a static binary without having to make any source changes (other than adding the relevant load_socket_core call to the list of libs in linit.c). As we discussed before, the current module arrangement means that unless require("socket.core") is satisfied by loading the library from some .../socket/core.so file, socket.lua won't work without modification. So you need to hack both files when building a lua binary with socket.core linked in.

Perhaps just a compile-time directive which adds in code to make load_socket_core() create the relevant table structures and initialise package.loaded correctly for static use, leaving you with a correctly-set-up socket.core package which socket.lua can later correctly require()?

2. A month or so ago, someone (I forget who) posted a very tiny patch which allows select() to be called either with integer-indexed tables of sockets (arrays) or with socket-indexed tables of sockets (associative tables).

Assuming the patch works, I strongly urge you to include it because it's both backwards compatible and quite handy, not least because it allows you to work with input socket lists and output socket lists in exactly the same form. Plus the patch actually _reduced_ the code size :-)

Neither of these changes would IMO affect existing users in any way.

My 2c.