lua-users home
lua-l archive

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


On Sun, 2003-12-14 at 16:56, Peter Drahos wrote:

What's the problem with just using loadlib? The libraries I wanted to
use have thus far supported it... they are all using a standard
convention, i.e.

do
	local init = loadlib("./mysql.so", "luaopen_mysql")
	init()
end

m=mysql_connect(...)

Mysql, Sqlite, Luasockets, and quite a few others. I do agree, a
loadlibrary("mysql.so") that automatically calls a function
luaopen_mysql would be a cleaner interface and force a standard upon
library developers... that would be nice, but I don't think a patch is
in need right now?

----
jeremy <jc@cowgar.com>

May the Source be with you!