Revert rev 10606 "Merged revisions 10498-10499,10503-10504,10506,10508,10511,10515-10516,10518-10519,10527,10530-10531,10536-10537,10539-10552,10558-10568,10574-10580,10582,10584,10588-10589,10594 via svnmerge from "
This reverts commit 379b9bcdf44dcd87c5eca7eb9a773aea793e7caf. From: William S Fulton <wsf@fultondesigns.co.uk> git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@13034 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d6b81eb831
commit
1acc0167d1
111 changed files with 482 additions and 757 deletions
|
|
@ -380,7 +380,7 @@
|
|||
</ul>
|
||||
<li><a href="Typemaps.html#Typemaps_nn43">Typemaps for multiple languages</a>
|
||||
<li><a href="Typemaps.html#Typemaps_optimal">Optimal code generation when returning by value</a>
|
||||
<li><a href="Typemaps.html#Typemaps_multi_argument_typemaps">Multi-argument typemaps</a>
|
||||
<li><a href="Typemaps.html#Typemaps_nn42">Multi-argument typemaps</a>
|
||||
<li><a href="Typemaps.html#runtime_type_checker">The run-time type checker</a>
|
||||
<ul>
|
||||
<li><a href="Typemaps.html#Typemaps_nn45">Implementation</a>
|
||||
|
|
@ -768,7 +768,6 @@
|
|||
<li><a href="Java.html#java_directors_classes">Director classes</a>
|
||||
<li><a href="Java.html#java_directors_overhead">Overhead and code bloat</a>
|
||||
<li><a href="Java.html#java_directors_example">Simple directors example</a>
|
||||
<li><a href="Java.html#java_directors_threading">Director threading issues</a>
|
||||
</ul>
|
||||
<li><a href="Java.html#java_allprotected">Accessing protected members</a>
|
||||
<li><a href="Java.html#common_customization">Common customization features</a>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@
|
|||
<li><a href="#java_directors_classes">Director classes</a>
|
||||
<li><a href="#java_directors_overhead">Overhead and code bloat</a>
|
||||
<li><a href="#java_directors_example">Simple directors example</a>
|
||||
<li><a href="#java_directors_threading">Director threading issues</a>
|
||||
</ul>
|
||||
<li><a href="#java_allprotected">Accessing protected members</a>
|
||||
<li><a href="#common_customization">Common customization features</a>
|
||||
|
|
@ -3451,26 +3450,6 @@ DirectorDerived::upcall_method() invoked.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="java_directors_threading"></a>20.5.5 Director threading issues</H3>
|
||||
|
||||
|
||||
<p>
|
||||
Depending on your operating system and version of Java and how you are using threads, you might find the JVM hangs on exit.
|
||||
There are a couple of solutions to try out. The preferred solution requires jdk-1.4 and later and uses <tt>AttachCurrentThreadAsDaemon</tt> instead of <tt>AttachCurrentThread</tt> whenever a call into the JVM is required. This can be enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling the C++ wrapper code. For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, to avoid the <tt>DetachCurrentThread</tt> call but this will result in a memory leak instead. For further details inspect the source code in the java/director.swg library file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Macros can be defined on the commandline when compiling your C++ code, or alternatively added to the C++ wrapper file as shown below:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%insert("runtime") %{
|
||||
#define SWIG_JAVA_NO_DETACH_CURRENT_THREAD
|
||||
%}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<H2><a name="java_allprotected"></a>20.6 Accessing protected members</H2>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1153,9 +1153,8 @@ public:
|
|||
|
||||
|
||||
<p>
|
||||
This is great for reducing the size of the wrappers, but the caveat is it does not work for the statically typed languages,
|
||||
such as C# and Java,
|
||||
which don't have optional arguments in the language,
|
||||
This is great for reducing the size of the wrappers, but the caveat is it does not work for the strongly typed languages
|
||||
which don't have optional arguments in the language, such as C# and Java.
|
||||
Another restriction of this feature is that it cannot handle default arguments that are not public.
|
||||
The following example illustrates this:
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<body bgcolor="#ffffff">
|
||||
<H1><a name="Sections"></a>SWIG-1.3 Development Documentation</H1>
|
||||
|
||||
Last update : SWIG-1.3.37 (in progress)
|
||||
Last update : SWIG-1.3.36 (in progress)
|
||||
|
||||
<H2>Sections</H2>
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
</ul>
|
||||
<li><a href="#Typemaps_nn43">Typemaps for multiple languages</a>
|
||||
<li><a href="#Typemaps_optimal">Optimal code generation when returning by value</a>
|
||||
<li><a href="#Typemaps_multi_argument_typemaps">Multi-argument typemaps</a>
|
||||
<li><a href="#Typemaps_nn42">Multi-argument typemaps</a>
|
||||
<li><a href="#runtime_type_checker">The run-time type checker</a>
|
||||
<ul>
|
||||
<li><a href="#Typemaps_nn45">Implementation</a>
|
||||
|
|
@ -702,7 +702,7 @@ variables (parms). The purpose of these variables will be explained shortly.
|
|||
</p>
|
||||
|
||||
<p><em>code</em> specifies the code used in the typemap.
|
||||
Usually this is C/C++ code, but in the statically typed target languages, such as Java and C#, this can contain target language code for certain typemaps.
|
||||
Usually this is C/C++ code, but in the strongly typed target languages, such as Java and C#, this can contain target language code for certain typemaps.
|
||||
It can take any one of the following forms:
|
||||
</p>
|
||||
|
||||
|
|
@ -1933,7 +1933,7 @@ to implement customized conversions.
|
|||
|
||||
<p>
|
||||
In addition, the "in" typemap allows the number of converted arguments to be
|
||||
specified. The <tt>numinputs</tt> attributes facilitates this. For example:
|
||||
specified. For example:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
|
|
@ -1946,12 +1946,7 @@ specified. The <tt>numinputs</tt> attributes facilitates this. For example:
|
|||
</div>
|
||||
|
||||
<p>
|
||||
At this time, only zero or one arguments may be converted.
|
||||
When <tt>numinputs</tt> is set to 0, the argument is effectively ignored and cannot be supplied from the target language.
|
||||
The argument is still required when making the C/C++ call and the above typemap
|
||||
shows the value used is instead obtained from a locally declared variable called <tt>temp</tt>.
|
||||
Usually <tt>numinputs</tt> is not specified, whereupon the default value is 1, that is, there is a one to one mapping of the number of arguments when used from the target language to the C/C++ call.
|
||||
<a href="#Typemaps_multi_argument_typemaps">Multi-argument typemaps</a> provide a similar concept where the number of arguments mapped from the target language to C/C++ can be changed for more tha multiple adjacent C/C++ arguments.
|
||||
At this time, only zero or one arguments may be converted.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -2816,7 +2811,7 @@ optimal attribute usage in the out typemap at example.i:7.
|
|||
However, it doesn't always get it right, for example when <tt>$1</tt> is within some commented out code.
|
||||
</p>
|
||||
|
||||
<H2><a name="Typemaps_multi_argument_typemaps"></a>10.9 Multi-argument typemaps</H2>
|
||||
<H2><a name="Typemaps_nn42"></a>10.9 Multi-argument typemaps</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ example.i(4): Syntax error in input.
|
|||
<li>117. Deprecated <tt>%new</tt> directive.
|
||||
<li>118. Deprecated <tt>%typemap(except)</tt>.
|
||||
<li>119. Deprecated <tt>%typemap(ignore)</tt>.
|
||||
<li>120. Deprecated command line option (-runtime, -noruntime).
|
||||
<li>120. Deprecated command line option (-c).
|
||||
<li>121. Deprecated <tt>%name</tt> directive.
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue