Fixing enums

This commit is contained in:
Artem Serebriyskiy 2014-03-03 09:54:13 +04:00
commit 1898099620
3 changed files with 55 additions and 45 deletions

View file

@ -19,8 +19,8 @@ assert(enums.globalinstance3==30)
assert(enums.AnonEnum1==0)
assert(enums.AnonEnum2==100)
-- In C enums from struct are exported without prefixing with struct name
-- In C++ they are prefixed.
-- In C enums from struct are exported into global namespace (without prefixing with struct name)
-- In C++ they are prefixed (as compatibility thing).
-- We are emulating xor :)
assert(enums.BAR1 ~= enums.Foo_BAR1) -- It is either C style, or C++ style, but not both
assert((enums.BAR1 ~= nil ) or (enums.Foo_BAR1 ~= nil))