On 10.10.2011 10:02, Daniel Silverstone wrote: > On Mon, Oct 10, 2011 at 09:34:22AM +0200, Uli Schlachter wrote: >> This test case comes from awesome's screen code. Since awesome >> handles screen changes via restarts, the set of screen objects never >> changes while awesome is running. So when lua asks for a screen with >> screen[1], it just gets our internal screen_t* as a light user >> datum. (see luaA_pushscreen) >> >> My current plan would be to turn this into a real userdata which >> just contains a pointer to the screen_t* and add an __eq entry to >> the metatable so that comparing screens still works. > > This is the easiest answer. The only trick there will be to ensure you > correctly unbox the userdata when you retrieve it. Shouldn't be hard, just > make sure you hit every point which currently deals with a screen_t* coming > from Lua and ensure you know it's a screen_t** and deref it appropriately.
Hi, here's my hack, hopefully it works: http://git.naquadah.org/?p=awesome.git;a=commitdiff;h=0181a64468b5766af252664254b597567434a19d (Yes, right now I'm too lazy to port that to the 3.4 branch) Uli -- The Angels have the phone box! -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.