diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2011-03-29 18:57:42 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2011-03-29 18:57:42 +0000 |
commit | 60a1c5eed305447ca06d16c89af5886ccb634cd0 (patch) | |
tree | e1b7585addc390d86b3ea6769a90babad3efffae /Examples | |
parent | d68b786b1900035ac41eb45eef75267bf7670804 (diff) | |
download | swig-60a1c5eed305447ca06d16c89af5886ccb634cd0.tar.gz |
Apply patch 3224663 for Tcl - NULL value fixes and performance improvements for classes with many methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples')
-rw-r--r-- | Examples/test-suite/null_pointer.i | 4 | ||||
-rw-r--r-- | Examples/test-suite/tcl/null_pointer_runme.tcl | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Examples/test-suite/null_pointer.i b/Examples/test-suite/null_pointer.i index 0bd7a9b92..0da827f99 100644 --- a/Examples/test-suite/null_pointer.i +++ b/Examples/test-suite/null_pointer.i @@ -8,5 +8,9 @@ bool func(A* a) { return !a; } + + A* getnull() { + return 0; + } } diff --git a/Examples/test-suite/tcl/null_pointer_runme.tcl b/Examples/test-suite/tcl/null_pointer_runme.tcl new file mode 100644 index 000000000..be99c7166 --- /dev/null +++ b/Examples/test-suite/tcl/null_pointer_runme.tcl @@ -0,0 +1,21 @@ +if [ catch { load ./null_pointer[info sharedlibextension] null_pointer} err_msg ] { + puts stderr "Could not load shared object:\n$err_msg" +} + +set a [A] +if {[func $a] != 0} { + puts stderr "null_pointer test 1 failed" + exit 1 +} + +set null [getnull] +if {$null != "NULL"} { + puts stderr "null_pointer test 2 failed" + exit 1 +} + +if {[llength [info commands "NULL"]] != 0} { + puts stderr "null_pointer test 3 failed" + exit 1 +} + |