diff options
| author | William S Fulton <wsf@fultondesigns.co.uk> | 2005-09-12 22:14:37 +0000 |
|---|---|---|
| committer | William S Fulton <wsf@fultondesigns.co.uk> | 2005-09-12 22:14:37 +0000 |
| commit | ef0eb857fd07a39d37ec3e96ec023691e54b8113 (patch) | |
| tree | be3fe30cdb189fa990e8d65bba646ed83b9f1569 /Examples/lua/variables | |
| parent | e8c4b5d45f2f061529f0aa7d290a0bf6411e94f9 (diff) | |
| download | swig-ef0eb857fd07a39d37ec3e96ec023691e54b8113.tar.gz | |
Lua fixes to work on Unix as well as windows.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/lua/variables')
| -rw-r--r-- | Examples/lua/variables/runme.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Examples/lua/variables/runme.lua b/Examples/lua/variables/runme.lua index 6dd71fb56..75235a33e 100644 --- a/Examples/lua/variables/runme.lua +++ b/Examples/lua/variables/runme.lua @@ -1,9 +1,12 @@ -- file: example.lua --- importing (lua doesnt have a nice way to do this) -if example==nil then - assert(loadlib("example.dll","Example_Init"))() +-- importing (lua does not have a nice way to do this) +loadlibrary = loadlib("example.so","Example_Init") +if loadlibrary == nil then + loadlibrary = loadlib("example.dll","Example_Init") end +assert(loadlibrary, "could not find dynamic libray") +loadlibrary() -- Try to set the values of some global variables |
