Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

make test has an error #77

Open
itsinder opened this issue Mar 19, 2018 · 0 comments
Open

make test has an error #77

itsinder opened this issue Mar 19, 2018 · 0 comments

Comments

@itsinder
Copy link

if [ uname = "Darwin" ]; then make test_macosx; else make test_posix; fi
make[1]: Entering directory '/home/i/luaffi'
LD_LIBRARY_PATH=./ lua test.lua
Running test
lua: test.lua:852: bad argument #1 to 'pairs' (table expected, got userdata)
stack traceback:
[C]: in function 'pairs'
test.lua:852: in main chunk
[C]: ?
Makefile:50: recipe for target 'test_posix' failed
make[1]: *** [test_posix] Error 1
make[1]: Leaving directory '/home/i/luaffi'
Makefile:18: recipe for target 'test' failed
make: *** [test] Error 2

The line in question is x, y = pairs(v)
v is a struct and I would actually think that we cannot iterate over a struct, but i might be wrong. If I remove the two lines that iterate over the struct using ipairs and pairs all tests pass

My lua: Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant