diff options
author | Alistair Delva <adelva@google.com> | 2024-04-10 14:15:29 -0700 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2024-04-11 12:58:28 -0700 |
commit | d0f0f90be16c2ac553b5fa08512045273135147a (patch) | |
tree | 5d9ebb7a04807ea8a609ddd18b0162bc87530e4b /Examples/ruby/pointer/index.html | |
parent | 6ffc1dbf29ba98c4d8aa71ebc9b484e973fe1030 (diff) | |
download | swig-master.tar.gz |
Change-Id: I47cef2be94299220d80265d949a95b58eee2c23b
Diffstat (limited to 'Examples/ruby/pointer/index.html')
-rw-r--r-- | Examples/ruby/pointer/index.html | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Examples/ruby/pointer/index.html b/Examples/ruby/pointer/index.html index c9d5b9c32..aff6bcd95 100644 --- a/Examples/ruby/pointer/index.html +++ b/Examples/ruby/pointer/index.html @@ -54,15 +54,17 @@ Now, in a script you would do this: <blockquote> <pre> -a = new_int(37) -b = new_int(42) -c = new_int(0) -add(a,b,c) -r = get_int(c) +a = Example::new_intp() +b = Example::new_intp() +c = Example::new_intp() +Example::intp_assign(a,37) +Example::intp_assign(b,42) +Example::add(a, b, c) +r = Example::intp_value(c) print "Result = #{r}\n" -delete_int(a) -delete_int(b) -delete_int(c) +Example::delete_intp(a) +Example::delete_intp(b) +Example::delete_intp(c) </pre> </blockquote> @@ -72,7 +74,7 @@ you would do this: <blockquote> <pre> -%include "pointer.i" +%include "cpointer.i" </pre> </blockquote> @@ -156,14 +158,8 @@ etc...) the complexity of pointer handling can be as complicated as you want to make it. <p> -<li>More documentation on the typemaps.i and pointer.i library files can be +<li>More documentation on the typemaps.i and cpointer.i library files can be found in the SWIG user manual. The files also contain documentation. - -<p> -<li>The pointer.i library is designed primarily for convenience. If you -are concerned about performance, you probably want to use a different -approach. - </ul> <hr> |