justincormack / ljsyscall

LuaJIT Unix syscall FFI
http://www.myriabit.com/ljsyscall/
Other
440 stars 53 forks source link

epoll.lua example fails with missing member 'fd' #146

Closed xopxe closed 10 years ago

xopxe commented 10 years ago

Running from git, under luajit 2.0.2, on Ubuntu 13.04 64 bits. All the tests run OK.

$ luajit examples/epoll.lua 
luajit: examples/epoll.lua:119: 'struct 2026' has no '__pairs' metamethod
stack traceback:
    [C]: in function 'pairs'
    examples/epoll.lua:119: in function 'loop'
    examples/epoll.lua:138: in main chunk
    [C]: at 0x004049c0

Any idea where to look?

justincormack commented 10 years ago

Apologies for that, I changed the interface for accept() to be simpler and did not update the example!

xopxe commented 10 years ago

Cool, thanks. Just a comment, ep declaration at line 74 could be a "local"?

justincormack commented 10 years ago

thanks, fixed.