Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anonymous enumerations #29

Open
mischief opened this issue Apr 7, 2020 · 1 comment
Open

anonymous enumerations #29

mischief opened this issue Apr 7, 2020 · 1 comment

Comments

@mischief
Copy link

mischief commented Apr 7, 2020

hi,

i'm trying to figure out why anonymous enumerations do not appear in ffiex anywhere after calling cdef.

for example,

ffi = require'ffiex'

-- example from /usr/include/net/if.h
ffi.cdef[[
enum
  {
    IFF_UP = 0x1,		/* Interface is up.  */
# define IFF_UP	IFF_UP
  };
]]

after running this, what lua code will print the value of IFF_UP as 1? i am confused because i cannot find IFF_UP in any of ffiex's tables.

@umegaya
Copy link
Owner

umegaya commented Apr 8, 2020

hi, thank you for reporting! this seems to be bug. I will fix it :D

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

No branches or pull requests

2 participants