[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_getmetatable() bug ?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 6 Nov 2003 18:05:15 -0200
>i'm not sure if this is a bug in lua_getmetatable() (or luaL_checkudata() ?)
>but if you call it with a non-valid index you get a SIGSEGV since 'obj' is
>NULL.
>
>
>gdbm> gdb -q lua
>(gdb) run -lgdbm -i
>Starting program: /usr/local/taj/bin/lua -lgdbm -i
>> d=gdbm.open('foobar', 'n')
>> d.close() -- should be d:close() !!
Strange. I get this:
% cat i
d=gdbm.open('foobar', 'n')
d.close()
% /tmp/lhf/lua-5.0/bin/lua -lgdbm i
/tmp/lhf/lua-5.0/bin/lua: i:2: bad argument #1 to `close' (gdbm handle expected, got no value)
stack traceback:
[C]: in function `close'
i:2: in main chunk
[C]: ?
--lhf