Lua improvements - Mark Gossage patch #1295168

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7472 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-09-20 20:05:06 +00:00
commit 76d58c55cb
9 changed files with 72 additions and 57 deletions

View file

@ -1,16 +1,16 @@
require("import") -- the import fn
import("newobject2",true) -- import code into global
import("newobject2",true) -- import code
foo1 = makeFoo() -- lua doesnt yet support static fns properly
assert(fooCount() == 1) -- lua doesnt yet support static fns properly
foo1 = newobject2.makeFoo() -- lua doesnt yet support static fns properly
assert(newobject2.fooCount() == 1) -- lua doesnt yet support static fns properly
foo2 = makeFoo()
assert(fooCount() == 2)
foo2 = newobject2.makeFoo()
assert(newobject2.fooCount() == 2)
foo1 = nil
collectgarbage()
assert(fooCount() == 1)
assert(newobject2.fooCount() == 1)
foo2 = nil
collectgarbage()
assert(fooCount() == 0)
assert(newobject2.fooCount() == 0)