Created
March 15, 2019 03:47
-
-
Save echiesse/274e2107664348cff89dbfa33f9911b0 to your computer and use it in GitHub Desktop.
Lua test script for creating a metatable from C API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(getmetatable(A)) | |
for i, v in pairs(A) do | |
print(i, v) | |
end | |
A.a = "banana" | |
A.subtable.a = "abacate" | |
print(A.a) | |
A.subtable.b = "repolho" | |
print(A.b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment