Lua - Fix char pointers, wchar_t pointers and char arrays so that nil can be passed as a valid value

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11963 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-04-02 19:48:20 +00:00
commit 662084aa06
5 changed files with 41 additions and 10 deletions

View file

@ -0,0 +1,12 @@
require("import") -- the import fn
import("char_strings") -- import code
assert (char_strings.CharPingPong("hi there") == "hi there")
assert (char_strings.CharPingPong(nil) == nil)
assert (char_strings.CharArrayPingPong("hi there") == "hi there")
assert (char_strings.CharArrayPingPong(nil) == nil)
assert (char_strings.CharArrayDimsPingPong("hi there") == "hi there")
assert (char_strings.CharArrayDimsPingPong(nil) == nil)