Cosmetic stray semi-colon removal after %typemap using quotes
This commit is contained in:
parent
ec965840ce
commit
c10a84c775
59 changed files with 258 additions and 256 deletions
|
|
@ -668,7 +668,7 @@ results. For example:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(newfree) char * "free($1);";
|
||||
%typemap(newfree) char * "free($1);"
|
||||
...
|
||||
%newobject strdup;
|
||||
...
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ Like, $imcall, this special variable is only expanded in the "dout" typemap.
|
|||
<p>This macro is used in the <tt>dimports</tt> typemap if a dependency on another D type generated by SWIG is added by a custom typemap.</p>
|
||||
<p>Consider the following code snippet:</p>
|
||||
<div class="code"><pre>
|
||||
%typemap(dinterfaces) SomeClass "AnInterface, AnotherInterface";
|
||||
%typemap(dinterfaces) SomeClass "AnInterface, AnotherInterface"
|
||||
</pre></div>
|
||||
<p>This causes SWIG to add <tt>AnInterface</tt> and <tt>AnotherInterface</tt> to the base class list of <tt>SomeClass</tt>:</p>
|
||||
<div class="targetlang"><pre>
|
||||
|
|
|
|||
|
|
@ -1114,7 +1114,7 @@ name of the type with namespace scope delimiters (<tt>::</tt>) replaced with a d
|
|||
change this, you can define your own typemaps for the custom types, e.g:
|
||||
</p>
|
||||
<div class="code"><pre>
|
||||
%typemap(doctype) MyDate "datetime.date";
|
||||
%typemap(doctype) MyDate "datetime.date"
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -4218,7 +4218,7 @@ You can copy the code below into an interface file and run SWIG on it and examin
|
|||
%}
|
||||
|
||||
// Expose C++ exception as a Java Exception by changing the Java base class and providing a getMessage()
|
||||
%typemap(javabase) MyNS::MyException "java.lang.RuntimeException";
|
||||
%typemap(javabase) MyNS::MyException "java.lang.RuntimeException"
|
||||
%rename(getMessage) MyNS::MyException::whatsup;
|
||||
|
||||
%inline %{
|
||||
|
|
@ -7065,7 +7065,7 @@ The corrected interface file looks like:
|
|||
<pre>
|
||||
// class Foo is handled in a different interface file:
|
||||
%import "Foo.i"
|
||||
%typemap("javapackage") Foo, Foo *, Foo & "com.wombat.foo";
|
||||
%typemap("javapackage") Foo, Foo *, Foo & "com.wombat.foo"
|
||||
%feature("director") Example;
|
||||
|
||||
%inline {
|
||||
|
|
@ -7093,11 +7093,11 @@ Note the helper macros below, <code>OTHER_PACKAGE_SPEC</code> and <code>ANOTHER_
|
|||
"package.for.most.classes";
|
||||
|
||||
%define OTHER_PACKAGE_SPEC(TYPE...)
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.other.classes";
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.other.classes"
|
||||
%enddef
|
||||
|
||||
%define ANOTHER_PACKAGE_SPEC(TYPE...)
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.another.set";
|
||||
%typemap("javapackage") TYPE, TYPE *, TYPE & "package.for.another.set"
|
||||
%enddef
|
||||
|
||||
OTHER_PACKAGE_SPEC(Package_2_class_one)
|
||||
|
|
@ -7291,7 +7291,7 @@ The typemaps to use then are as follows:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(javabase) FileException "java.lang.Exception";
|
||||
%typemap(javabase) FileException "java.lang.Exception"
|
||||
%typemap(javacode) FileException %{
|
||||
public String getMessage() {
|
||||
return what();
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ Let's edit the interface file such that the C type "div_t*" is changed
|
|||
<div class="code"><pre>
|
||||
%module test
|
||||
|
||||
%typemap(cin) div_t* ":my-pointer";
|
||||
%typemap(cin) div_t* ":my-pointer"
|
||||
|
||||
%feature("intern_function", "1");
|
||||
%feature("export");
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ so:
|
|||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
%typemap("phpinterfaces") MyIterator "Iterator";
|
||||
%typemap("phpinterfaces") MyIterator "Iterator"
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -1707,7 +1707,7 @@ For example: </p>
|
|||
<div class="code">
|
||||
<pre>%rename("is_it_safe?") is_it_safe();
|
||||
|
||||
%typemap(out) int is_it_safe "$result = ($1 != 0) ? Qtrue : Qfalse;";
|
||||
%typemap(out) int is_it_safe "$result = ($1 != 0) ? Qtrue : Qfalse;"
|
||||
|
||||
int is_it_safe();</pre>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ Here are some examples of valid typemap specifications:
|
|||
%typemap(in) int {
|
||||
$1 = PyInt_AsLong($input);
|
||||
}
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);";
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);"
|
||||
%typemap(in) int %{
|
||||
$1 = PyInt_AsLong($input);
|
||||
%}
|
||||
|
|
@ -803,7 +803,7 @@ Here are some examples of valid typemap specifications:
|
|||
}
|
||||
|
||||
/* Typemap with modifiers */
|
||||
%typemap(in, doc="integer") int "$1 = scm_to_int($input);";
|
||||
%typemap(in, doc="integer") int "$1 = scm_to_int($input);"
|
||||
|
||||
/* Typemap applied to patterns of multiple arguments */
|
||||
%typemap(in) (char *str, int len),
|
||||
|
|
@ -1356,13 +1356,13 @@ const reference are written like this:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(in) int "... convert to int ...";
|
||||
%typemap(in) short "... convert to short ...";
|
||||
%typemap(in) float "... convert to float ...";
|
||||
%typemap(in) int "... convert to int ..."
|
||||
%typemap(in) short "... convert to short ..."
|
||||
%typemap(in) float "... convert to float ..."
|
||||
...
|
||||
%typemap(in) const int & "... convert ...";
|
||||
%typemap(in) const short & "... convert ...";
|
||||
%typemap(in) const float & "... convert ...";
|
||||
%typemap(in) const int & "... convert ..."
|
||||
%typemap(in) const short & "... convert ..."
|
||||
%typemap(in) const float & "... convert ..."
|
||||
...
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -1943,7 +1943,7 @@ Occasionally, typemap code will be specified using a few alternative forms. For
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);";
|
||||
%typemap(in) int "$1 = PyInt_AsLong($input);"
|
||||
%typemap(in) int %{
|
||||
$1 = PyInt_AsLong($input);
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue