The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
|
|
@ -5,9 +5,12 @@ catch { load ./example.dll example} ;# Windows
|
|||
|
||||
# First create some objects using the pointer library.
|
||||
puts "Testing the pointer library"
|
||||
set a [ptrcreate int 37]
|
||||
set b [ptrcreate int 42]
|
||||
set c [ptrcreate int] ;# Memory for result
|
||||
set a [new_intp]
|
||||
set b [new_intp]
|
||||
set c [new_intp] ;# Memory for result
|
||||
|
||||
intp_assign $a 37
|
||||
intp_assign $b 42
|
||||
|
||||
puts " a = $a"
|
||||
puts " b = $b"
|
||||
|
|
@ -17,13 +20,13 @@ puts " c = $c"
|
|||
add $a $b $c
|
||||
|
||||
# Now get the result
|
||||
set r [ptrvalue $c]
|
||||
set r [intp_value $c]
|
||||
puts " 37 + 42 = $r"
|
||||
|
||||
# Clean up the pointers
|
||||
ptrfree $a
|
||||
ptrfree $b
|
||||
ptrfree $c
|
||||
delete_intp $a
|
||||
delete_intp $b
|
||||
delete_intp $c
|
||||
|
||||
# Now try the typemap library
|
||||
# This should be much easier. Now how it is no longer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue