[ I keep CC'ing the mailing list. Hope that's ok ] Jon Shapcott <[EMAIL PROTECTED]> wrote Sat, May 07, 2005: > > On Fri, May 06, 2005 at 09:15:13PM +0200, Jonas Fonseca wrote: > > Jon Shapcott <[EMAIL PROTECTED]> wrote Fri, May 06, 2005: > > > Thanks a lot for the help. I should return the favour, and maybe hack some > > > on the unstable version. Both core.c and hooks.c get quite a lot shorter > > > when you turn the cut'n'paste into functions, a drop some of the arcane > > > passing of the global lua_State in and out of dialog events. > > > > Don't mind if you do. ;) > > It also means sorting out some of the stuff in the lua configuration files. > So the whole job could take a while. I shall write some tests too.
Then you should probably discuss your ideas with Miciah, since he has been taking care of the Lua code lately. > > > Now to get those function references into the lua 5 api ... > > > > Huh? > > l_bind_key and a couple of the dialogs take references to functions, and use > those references to push the appropriate function onto the top of the Lua > stack (you know this, I'm sure). Lua 5 provides some compatability macros > for the Lua 4 lua_ref(), lua_getref() and lua_unref() functions. These have > become luaL_ref(), lua_rawgeti() and luaL_unref() respectively in Lua 5. It > all looks straightforward, but I got distracted by broken dialogs before > doing it. > > Those luaL_foo() functions are another reason why lauxlib.h is required. > I've noticed this demand in the 0.11 CVS version of the Lua scripting > module. core.h still uses the HAVE_LUAXLIB_H to provide the prototypes for > lua_ref() and lua_unref(), which is best solved by using the new Lua > reference interface. > > I'll download the CVS and start on those after I've tested it on the 0.10.5 > version I'm using. -- Jonas Fonseca _______________________________________________ elinks-users mailing list [email protected] http://linuxfromscratch.org/mailman/listinfo/elinks-users
