lua-users home
lua-l archive

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


I believe you have the following problem:

Renaming modules isn't as simple as renaming it's dll- file, because
Lua tries to call the "luaopen_<modulename>" IN the dll; if you rename
the dll and require "socket", there is no "luaopen_socket" function,
only a "luaopen_luasocket", or whatever the previous name was.

The simplest fix is to change luaopen_luasocket to luaopen_socket
inside the C-sourcefiles of your module and to recompile; it *may* be
possible to change the dll directly, via hex-editor, but I definitely
wouldn't recommend it (you can change dependecies on "lua5.1.dll" to
"lua51.dll" that way though, which is sometimes incredibly useful:
string.gsub(yourDll, "lua5.1.dll", "lua51.dll\0"); tested on win32).