aboutsummaryrefslogtreecommitdiff
path: root/Examples/perl5
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/perl5')
-rw-r--r--Examples/perl5/index.html2
-rw-r--r--Examples/perl5/multimap/example.i2
-rw-r--r--Examples/perl5/pointer/index.html30
-rw-r--r--Examples/perl5/reference/index.html2
4 files changed, 16 insertions, 20 deletions
diff --git a/Examples/perl5/index.html b/Examples/perl5/index.html
index 23c8ff658..2daabaaf9 100644
--- a/Examples/perl5/index.html
+++ b/Examples/perl5/index.html
@@ -72,7 +72,7 @@ Please see the <a href="../../Doc/Manual/Windows.html">Windows</a> page in the m
Due to wide variations in the Perl C API and differences between versions such as the ActivePerl release for Windows,
the code generated by SWIG is extremely messy.
If the code doesn't compile or work with your version of Perl, please let us know by
-contacting us on the <a href="http://www.swig.org/mail.html">mailing lists</a>.
+contacting us on the <a href="https://www.swig.org/mail.html">mailing lists</a>.
Better yet, send us a patch.
</body>
diff --git a/Examples/perl5/multimap/example.i b/Examples/perl5/multimap/example.i
index 64eb6a7f7..f2dff2418 100644
--- a/Examples/perl5/multimap/example.i
+++ b/Examples/perl5/multimap/example.i
@@ -15,7 +15,7 @@ extern int squareCubed (int n, int *OUTPUT);
extern int gcd(int x, int y);
-%typemap(arginit) (int argc, char *argv[]) "$2 = 0;";
+%typemap(arginit) (int argc, char *argv[]) "$2 = 0;"
%typemap(in) (int argc, char *argv[]) {
AV *tempav;
diff --git a/Examples/perl5/pointer/index.html b/Examples/perl5/pointer/index.html
index 94467bc36..b248c81e8 100644
--- a/Examples/perl5/pointer/index.html
+++ b/Examples/perl5/pointer/index.html
@@ -72,23 +72,25 @@ you would do this:
<blockquote>
<pre>
-%include "pointer.i"
+%include "cpointer.i"
</pre>
-</blockquote?
+</blockquote>
and in a script you would do this:
<blockquote>
<pre>
-$a = ptrcreate("int",37);
-$b = ptrcreate("int",42);
-$c = ptrcreate("int");
-add($a,$b,$c);
-$r = ptrvalue($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";
-ptrfree($a);
-ptrfree($b);
-ptrfree($c);
+example::delete_intp($a);
+example::delete_intp($b);
+example::delete_intp($c);
</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>
diff --git a/Examples/perl5/reference/index.html b/Examples/perl5/reference/index.html
index 70b4f3d34..5b2912522 100644
--- a/Examples/perl5/reference/index.html
+++ b/Examples/perl5/reference/index.html
@@ -104,7 +104,7 @@ with a pair of set/get functions like this:
class VectorArray {
public:
...
- %addmethods {
+ %extend {
Vector &amp;get(int index) {
return (*self)[index];
}