summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2011-08-04 06:21:16 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2011-08-04 06:21:16 +0000
commit6747c6a13d402683b567d51f9a99ac2df65c47c0 (patch)
treeffd8f8b08bba29637b35c74f69fbe4f385aa38f2 /Doc
parent210266cd7004108b074fac9da4fc97d1df0adc53 (diff)
downloadswig-6747c6a13d402683b567d51f9a99ac2df65c47c0.tar.gz
Add section on void * pointers for C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12769 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Manual/CSharp.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/Manual/CSharp.html b/Doc/Manual/CSharp.html
index 6691400b7..968d629c4 100644
--- a/Doc/Manual/CSharp.html
+++ b/Doc/Manual/CSharp.html
@@ -455,6 +455,24 @@ Windows users can also get the examples working using a
<a href="http://www.cygwin.com">Cygwin</a> or <a href="http://www.mingw.org">MinGW</a> environment for automatic configuration of the example makefiles.
Any one of the three C# compilers (Portable.NET, Mono or Microsoft) can be detected from within a Cygwin or Mingw environment if installed in your path.
+<H2><a name="CSharp_arrays"></a>18.3 Void pointers</H2>
+
+
+<p>
+By default SWIG treats <tt>void *</tt> as any other pointer and hence marshalls it as a type wrapper class called <tt>SWIGTYPE_p_void</tt>.
+If you want to marshall with the .NET <tt>System.IntPtr</tt> type instead, there is a simple set of named typemaps called
+<tt>void *VOID_INT_PTR</tt> that can be used.
+They can be applied like any other named typemaps:
+</p>
+
+
+<div class="code">
+<pre>
+%apply void *VOID_INT_PTR { void * }
+void * f(void *v);
+</pre>
+</div>
+
<H2><a name="CSharp_arrays"></a>18.3 C# Arrays</H2>