lua-users home
lua-l archive

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

With Lua 5.0 alpha I am getting very close to being able to replace perl
with Lua for general-purpose scripting (all I need now are dynamically
loadable packages like poslib and luasocket).  Anyway, it still isn't
working quite the way I had hoped.  I wanted to do something like this:

    poslib = {}
    local f, e = loadlib("lposlib.dll", "lua_poslibopen")
    if not f then
    setglobals(f, poslib)  -- (this does not work)

But, I cannot set the globals table for a C function, and if I wrap it
inside a Lua function it has no effect (all poslib functions are still
entered in the original globals table).  Ideally, I would expect C
functions to have function-specific globals tables just like Lua

Are there any plans to change this?  Is there a simple work around I am