Support for Lua added - patch from Mark Gossage
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7365 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e2c90c74a9
commit
127e49e03b
27 changed files with 2266 additions and 0 deletions
16
SWIG/Examples/test-suite/lua/newobject1_runme.lua
Normal file
16
SWIG/Examples/test-suite/lua/newobject1_runme.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
require("import") -- the import fn
|
||||
import("newobject1",true) -- import code into global
|
||||
|
||||
foo1 = Foo_makeFoo() -- lua doesnt yet support static fns properly
|
||||
assert(Foo_fooCount() == 1) -- lua doesnt yet support static fns properly
|
||||
|
||||
foo2 = foo1:makeMore()
|
||||
assert(Foo_fooCount() == 2)
|
||||
|
||||
foo1 = nil
|
||||
collectgarbage()
|
||||
assert(Foo_fooCount() == 1)
|
||||
|
||||
foo2 = nil
|
||||
collectgarbage()
|
||||
assert(Foo_fooCount() == 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue