lua-users home
lua-l archive

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

On Sat, 31 Oct 2009 23:59:59 +0100
Mike Pall <> wrote:

Hello Mike,

> Yes, here it is: the first public release of LuaJIT 2.0!

very nice! I was running some tests and the performance boost is
tremendous. Even though the vast majority of my code runs through
LuaJIT without a noticeable difference, some tests bail out if a
certain function in my C library is getting called. The message is:

/usr/local/bin/luajit-2.0.0-beta1: ./tek/ui/class/drawable.lua:205: bad
argument #-2 to 'drawimage' (number expected, got table)

I got it nailed down to the following line (tek/lib/visual_api.c:694) in
my C code:

   fmt = luaL_checkinteger(L, -1);

This C code fumbles around in nested tables which are passed in by the
caller. The next Lua function on the call stack is this:

function Drawable:drawImage(...)

obviously, the same code was working before (and with LuaJIT 1.x). It
only affects the drawimage function, all other C library functions so
far work as expected. Without a spontaneous idea from your side I would
try to provide a more isolated test case. Or, if you want to try it
yourself, see [1] and run f.ex. bin/imagetest.lua from the top-level
directory (using Linux, gcc-4.3.4).

- Timm


Timm S. Mueller <>
Schulze & Mueller GbR, Gryphiusstr. 2, 10245 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 93624410,