lua-users home
lua-l archive

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


Hi!

Am 31.10.2010 02:04, schrieb Luiz Henrique de Figueiredo:
> Lua 5.2.0 (work5) is now available at
> 
> [...]
> 
> All feedback welcome. Thanks.
> --lhf
> 

I have two problems on
Linux linux-s57z 2.6.27.29-0.1-pae #1 SMP 2009-08-15 17:53:59 +0200 i686
i686 i386 GNU/Linux
with
Lua 5.2.0 (work5)  Copyright (C) 1994-2010 Lua.org, PUC-Rio

---------------------------------8<-------------------------------
$ mkdir abcde
$ touch abcde/core.so
$ cat > abcde.lua
require( "abcde.core" )
^D
$ cat > test.lua
local debug = require( "debug" )
print( pcall( require, "abcde" ) )
print( pcall( require, "abcde" ) )
print( package.loaded.abcde )
print( debug.getuservalue( package.loaded.abcde ) )
^D
$ lua5.2 test.lua
false   error loading module 'abcde.core' from file './abcde/core.so':
        ./abcde/core.so: file too short
false   loop or previous error loading module 'abcde'
userdata: 0x806c04c
lua5.2: test.lua:5: bad argument #1 to 'getuservalue' (userdata
expected, got userdata)
stack traceback:
        [C]: in function 'getuservalue'
        test.lua:5: in main chunk
        [C]: in ?
---------------------------------8<-------------------------------

First problem: The sentinel is still in package.loaded.abcde although
loading failed (in a submodule).
Second problem: The "userdata expected, got userdata" error -- probably
caused by light userdata.


Philipp