Misc. typos

found via `codespell` and `grep`
This commit is contained in:
luz.paz 2018-05-14 11:00:52 -04:00 • committed by luz paz
commit 60dfa31a67
90 changed files with 155 additions and 155 deletions

View file

@ -11605,7 +11605,7 @@ Version 1.3.23 (November 11, 2004)
- Properly qualify type in syntax as 'long(2)' or 'Foo()', - Properly qualify type in syntax as 'long(2)' or 'Foo()',
this solve old problem with default args, and probably this solve old problem with default args, and probably
other problems around. However, the default arg problem other problems around. However, the default arg problem
was also already solved by William (see bellow). was also already solved by William (see below).
- Fix feature_set and feature_get methods. Before - Fix feature_set and feature_get methods. Before
they look from particular to general and keep the first they look from particular to general and keep the first

View file

@ -67,7 +67,7 @@ Version 4.0.0 (in progress)
std_complex.i. std_complex.i.
2018-01-30: smarchetto 2018-01-30: smarchetto
[Scilab] add type name argument in SWIG_ptr() function to cast from pointer adress to typed pointers [Scilab] add type name argument in SWIG_ptr() function to cast from pointer address to typed pointers
2018-01-16: wsfulton 2018-01-16: wsfulton
Expressions following a preprocessor directive must now be separated by whitespace Expressions following a preprocessor directive must now be separated by whitespace
@ -201,7 +201,7 @@ Version 4.0.0 (in progress)
2017-10-01: joequant 2017-10-01: joequant
allow R package names with docs allow R package names with docs
allowing mulitple get accessors in R allowing multiple get accessors in R
fix smrt-pointer and NAMESPACE support fix smrt-pointer and NAMESPACE support
constructors now returning smart pointers (if class constructors now returning smart pointers (if class
declared as such) declared as such)

View file

@ -236,7 +236,7 @@ The following functions can be used to help debug SWIG parse trees.
<blockquote> <blockquote>
Prints the tag-structure of the parse tree to standard output. <tt>node</tt> is the top-level parse tree node. <tt>prefix</tt> is Prints the tag-structure of the parse tree to standard output. <tt>node</tt> is the top-level parse tree node. <tt>prefix</tt> is
a string prefix thats added to the start of each line. Normally, you would specify the empty string or NIL for <tt>prefix</tt>. a string prefix that's added to the start of each line. Normally, you would specify the empty string or NIL for <tt>prefix</tt>.
This function is called by the <tt>-debug-tags</tt> option to SWIG. This function is called by the <tt>-debug-tags</tt> option to SWIG.
<pre> <pre>

View file

@ -610,7 +610,7 @@ char *xxx();
<p> <p>
In the case of overloaded functions, mulitple layers are In the case of overloaded functions, multiple layers are
generated. First, all the overloads for a given name are separated generated. First, all the overloads for a given name are separated
out into groups based on arity, and are wrapped in out into groups based on arity, and are wrapped in
defmethods. Each method calls a distinct wrapper function, but are defmethods. Each method calls a distinct wrapper function, but are
@ -1239,7 +1239,7 @@ int zzz(A *inst = 0); /* return inst-&gt;x + inst-&gt;y */
We resolve this issue, by noting synonym relationships between We resolve this issue, by noting synonym relationships between
types while generating the interface. A Primary type is selected types while generating the interface. A Primary type is selected
(more on this below) from the candidate list of synonyms. For (more on this below) from the candidate list of synonyms. For
all other synonyms, intead of generating a distinct CLOS class all other synonyms, instead of generating a distinct CLOS class
definition, we generate a form that expands to: definition, we generate a form that expands to:
</p> </p>
<div class="targetlang"> <div class="targetlang">

View file

@ -1989,7 +1989,7 @@ and more or less equivalent usage from C#
<p> <p>
The C++ code will always print out 20, but the value printed out may not be this in the C# equivalent code. The C++ code will always print out 20, but the value printed out may not be this in the C# equivalent code.
In order to understand why, consider a garbage collection occuring... In order to understand why, consider a garbage collection occurring...
</p> </p>
<div class="code"> <div class="code">
@ -2141,7 +2141,7 @@ The <tt>CDate &amp;</tt> and <tt>const CDate &amp;</tt> C# code is generated fro
<p> <p>
where '$csclassname' is translated into the proxy class name, <tt>CDate</tt> and '$csinput' is translated into the name of the parameter, eg <tt>dateIn</tt>. where '$csclassname' is translated into the proxy class name, <tt>CDate</tt> and '$csinput' is translated into the name of the parameter, eg <tt>dateIn</tt>.
From C#, the intention is then to call into a modifed API with something like: From C#, the intention is then to call into a modified API with something like:
</p> </p>
<div class="code"> <div class="code">

View file

@ -1853,7 +1853,7 @@
</ul> </ul>
<li><a href="Scilab.html#Scilab_wrapping_pointers">Pointers</a> <li><a href="Scilab.html#Scilab_wrapping_pointers">Pointers</a>
<ul> <ul>
<li><a href="Scilab.html#Scilab_wrapping_pointers_pointer_adresses">Utility functions</a> <li><a href="Scilab.html#Scilab_wrapping_pointers_pointer_addresses">Utility functions</a>
<li><a href="Scilab.html#Scilab_wrapping_pointers_null_pointers">Null pointers:</a> <li><a href="Scilab.html#Scilab_wrapping_pointers_null_pointers">Null pointers:</a>
</ul> </ul>
<li><a href="Scilab.html#Scilab_wrapping_structs">Structures</a> <li><a href="Scilab.html#Scilab_wrapping_structs">Structures</a>

View file

@ -471,7 +471,7 @@ The most Go idiomatic way to manage the memory for some C++ class is to call
<tt><a href="https://golang.org/doc/effective_go.html#defer">defer</a></tt> of <tt><a href="https://golang.org/doc/effective_go.html#defer">defer</a></tt> of
the <tt>DeleteClassName</tt> call. Using <tt>defer</tt> ensures that the memory the <tt>DeleteClassName</tt> call. Using <tt>defer</tt> ensures that the memory
of the C++ object is freed as soon as the function containing the <tt>defer</tt> of the C++ object is freed as soon as the function containing the <tt>defer</tt>
statement returns. Furthemore <tt>defer</tt> works great for short-lived statement returns. Furthermore <tt>defer</tt> works great for short-lived
objects and fits nicely C++'s RAII idiom. Example: objects and fits nicely C++'s RAII idiom. Example:
</p> </p>
<div class="code"> <div class="code">
@ -512,7 +512,7 @@ func main() {
<p> <p>
Using <tt>defer</tt> has limitations though, especially when it comes to Using <tt>defer</tt> has limitations though, especially when it comes to
long-lived C++ objects whichs lifetimes are hard to predict. For such C++ long-lived C++ objects whose lifetimes are hard to predict. For such C++
objects a common technique is to store the C++ object into a Go object, and to objects a common technique is to store the C++ object into a Go object, and to
use the Go function <tt>runtime.SetFinalizer</tt> to add a finalizer which frees use the Go function <tt>runtime.SetFinalizer</tt> to add a finalizer which frees
the C++ object when the Go object is freed. It is strongly recommended to read the C++ object when the Go object is freed. It is strongly recommended to read
@ -788,7 +788,7 @@ DirectorInterface</tt> are a subset of the public and protected virtual methods
of the C++ class. If the <tt>DirectorInterface</tt> contains a method with a of the C++ class. If the <tt>DirectorInterface</tt> contains a method with a
matching signature to a virtual method of the C++ class then the virtual C++ matching signature to a virtual method of the C++ class then the virtual C++
method will be overwritten with the Go method. As Go doesn't support protected method will be overwritten with the Go method. As Go doesn't support protected
methods all overriden protected virtual C++ methods will be public in Go. methods all overridden protected virtual C++ methods will be public in Go.
</p> </p>
<p> <p>
@ -941,7 +941,7 @@ methods of the <tt>FooBarAbstract</tt> C++ class by means of embedding. The
public <tt>FooBarGo</tt> interface type includes the <tt>FooBarAbstract</tt> public <tt>FooBarGo</tt> interface type includes the <tt>FooBarAbstract</tt>
interface and hence <tt>FooBarGo</tt> can be used as a drop in replacement for interface and hence <tt>FooBarGo</tt> can be used as a drop in replacement for
<tt>FooBarAbstract</tt> while the reverse isn't possible and would raise a <tt>FooBarAbstract</tt> while the reverse isn't possible and would raise a
compile time error. Furthemore the constructor and destructor functions <tt> compile time error. Furthermore the constructor and destructor functions <tt>
NewFooBarGo</tt> and <tt>DeleteFooBarGo</tt> take care of all the director NewFooBarGo</tt> and <tt>DeleteFooBarGo</tt> take care of all the director
specifics and to the user the class appears as any other SWIG wrapped C++ specifics and to the user the class appears as any other SWIG wrapped C++
class. class.
@ -1054,7 +1054,7 @@ type overwrittenMethodsOnFooBarAbstract struct {
fb FooBarAbstract fb FooBarAbstract
// If additional constructor arguments have been given they are typically // If additional constructor arguments have been given they are typically
// stored here so that the overriden methods can use them. // stored here so that the overridden methods can use them.
} }
func (om *overwrittenMethodsOnFooBarAbstract) Foo() string { func (om *overwrittenMethodsOnFooBarAbstract) Foo() string {
@ -1081,7 +1081,7 @@ func NewFooBarGo() FooBarGo {
// The memory of the FooBarAbstract director object instance can be // The memory of the FooBarAbstract director object instance can be
// automatically freed once the FooBarGo instance is garbage collected by // automatically freed once the FooBarGo instance is garbage collected by
// uncommenting the following line. Please make sure to understand the // uncommenting the following line. Please make sure to understand the
// runtime.SetFinalizer specific gotchas before doing this. Furthemore // runtime.SetFinalizer specific gotchas before doing this. Furthermore
// DeleteFooBarGo should be deleted if a finalizer is in use or the fooBarGo // DeleteFooBarGo should be deleted if a finalizer is in use or the fooBarGo
// struct needs additional data to prevent double deletion. // struct needs additional data to prevent double deletion.
// runtime.SetFinalizer(fbgs, FooBarGo.deleteFooBarAbstract) // runtime.SetFinalizer(fbgs, FooBarGo.deleteFooBarAbstract)

View file

@ -4029,7 +4029,7 @@ write handlers for a large number of methods will require
repetitive duplication of the <code>director:except</code> feature code repetitive duplication of the <code>director:except</code> feature code
for each director method. for each director method.
To mitigate this, a second approach is provided via typemaps in a To mitigate this, a second approach is provided via typemaps in a
fashion analagous to fashion analogous to
the <a href="Typemaps.html#throws_typemap">"throws" typemap</a>. the <a href="Typemaps.html#throws_typemap">"throws" typemap</a>.
The "throws" typemap provides a way to map all the C++ The "throws" typemap provides a way to map all the C++
exceptions listed in a method's defined exceptions (either from exceptions listed in a method's defined exceptions (either from
@ -8455,7 +8455,7 @@ System.out.println("element value: " + container.getElement().getValue());
<p> <p>
The C++ code will always print out 20, but the value printed out may not be this in the Java equivalent code. The C++ code will always print out 20, but the value printed out may not be this in the Java equivalent code.
In order to understand why, consider a garbage collection occuring... In order to understand why, consider a garbage collection occurring...
</p> </p>
<div class="code"> <div class="code">
@ -8597,7 +8597,7 @@ The <tt>CDate &amp;</tt> and <tt>const CDate &amp;</tt> Java code is generated f
<p> <p>
where '$javaclassname' is translated into the proxy class name, <tt>CDate</tt> and '$javainput' is translated into the name of the parameter, eg <tt>dateIn</tt>. where '$javaclassname' is translated into the proxy class name, <tt>CDate</tt> and '$javainput' is translated into the name of the parameter, eg <tt>dateIn</tt>.
From Java, the intention is then to call into a modifed API with something like: From Java, the intention is then to call into a modified API with something like:
</p> </p>
<div class="code"> <div class="code">

View file

@ -101,7 +101,7 @@ that era had a component &gt; 99. For example:</p>
<pre> <pre>
$ swig -c++ -javascript -v8 -DV8_VERSION=0x032530 example.i</pre> $ swig -c++ -javascript -v8 -DV8_VERSION=0x032530 example.i</pre>
</div> </div>
<p>If you're targetting V8 &gt;= 4.3.0, you would just run swig like so:</p> <p>If you're targeting V8 &gt;= 4.3.0, you would just run swig like so:</p>
<div class="shell"> <div class="shell">
<pre> <pre>
$ swig -c++ -javascript -v8 example.i</pre> $ swig -c++ -javascript -v8 example.i</pre>

View file

@ -364,7 +364,7 @@ a number of packages to be installed. Full instructions at
<p> <p>
SWIG is known to work on various flavors of OS X. Follow the Unix installation SWIG is known to work on various flavors of OS X. Follow the Unix installation
instructions above. However, as of this writing, there is still great deal of instructions above. However, as of this writing, there is still great deal of
inconsistency with how shared libaries are handled by various scripting languages inconsistency with how shared libraries are handled by various scripting languages
on OS X. on OS X.
</p> </p>

View file

@ -6217,8 +6217,8 @@ they treat it affects how the pure Python module will be able to
locate the C module. locate the C module.
</p> </p>
<p>The details concerning this are covered completly in the documentation <p>The details concerning this are covered completely in the documentation
for Python itself. Links to the relavent sections follow: for Python itself. Links to the relevant sections follow:
</p> </p>
<ul> <ul>

View file

@ -39,7 +39,7 @@
</ul> </ul>
<li><a href="#Scilab_wrapping_pointers">Pointers</a> <li><a href="#Scilab_wrapping_pointers">Pointers</a>
<ul> <ul>
<li><a href="#Scilab_wrapping_pointers_pointer_adresses">Utility functions</a> <li><a href="#Scilab_wrapping_pointers_pointer_addresses">Utility functions</a>
<li><a href="#Scilab_wrapping_pointers_null_pointers">Null pointers:</a> <li><a href="#Scilab_wrapping_pointers_null_pointers">Null pointers:</a>
</ul> </ul>
<li><a href="#Scilab_wrapping_structs">Structures</a> <li><a href="#Scilab_wrapping_structs">Structures</a>
@ -92,7 +92,7 @@ This chapter explains how to use SWIG for Scilab. After this introduction, you s
<p> <p>
SWIG for Scilab supports Linux. Other operating sytems haven't been tested. SWIG for Scilab supports Linux. Other operating systems haven't been tested.
</p> </p>
<p> <p>
@ -337,7 +337,7 @@ There are a few exceptions, such as constants and enumerations, which can be wra
<p> <p>
In Scilab 5.x, identifier names are composed of 24 characters maximum (this limitation disappears from Scilab 6.0 onwards). In Scilab 5.x, identifier names are composed of 24 characters maximum (this limitation disappears from Scilab 6.0 onwards).
<br>By default, variable, member, and function names longer than 24 charaters are truncated, and a warning is produced for each truncation. <br>By default, variable, member, and function names longer than 24 characters are truncated, and a warning is produced for each truncation.
</p> </p>
<p>This can cause ambiguities, especially when wrapping structs/classes, for which the wrapped function name is composed of the struct/class name and field names. <p>This can cause ambiguities, especially when wrapping structs/classes, for which the wrapped function name is composed of the struct/class name and field names.
In these cases, the <a href="SWIG.html#SWIG_rename_ignore">%rename directive</a> can be used to choose a different Scilab name. In these cases, the <a href="SWIG.html#SWIG_rename_ignore">%rename directive</a> can be used to choose a different Scilab name.
@ -765,7 +765,7 @@ typedef enum { RED, BLUE, GREEN } color;
Pointers are supported by SWIG. A pointer can be returned from a wrapped C/C++ function, stored in a Scilab variable, and used in input argument of another C/C++ function. Pointers are supported by SWIG. A pointer can be returned from a wrapped C/C++ function, stored in a Scilab variable, and used in input argument of another C/C++ function.
</p> </p>
<p> <p>
Also, thanks to the SWIG runtime which stores informations about types, pointer types are tracked between exchanges Scilab and the native code. Indeed pointer types are stored alongside the pointer adress. Also, thanks to the SWIG runtime which stores information about types, pointer types are tracked between exchanges Scilab and the native code. Indeed pointer types are stored alongside the pointer address.
A pointer is mapped to a Scilab structure (<a href="https://help.scilab.org/docs/5.5.2/en_US/tlist.html">tlist</a>), which contains as fields the pointer address and the pointer type (in fact a pointer to the type information structure in the SWIG runtime). A pointer is mapped to a Scilab structure (<a href="https://help.scilab.org/docs/5.5.2/en_US/tlist.html">tlist</a>), which contains as fields the pointer address and the pointer type (in fact a pointer to the type information structure in the SWIG runtime).
<br> <br>
Why a native pointer is not mapped to a Scilab pointer (type name: "pointer", type ID: 128) ? The big advantage of mapping to a <tt>tlist</tt> is that it exposes a new type for the pointer in Scilab, type which can be acessed in Scilab with the <a href="https://help.scilab.org/docs/5.5.2/en_US/typeof.html">typeof</a> function, and manipulated using the <a href="https://help.scilab.org/docs/5.5.2/en_US/overloading.html">overloading</a> mechanism. Why a native pointer is not mapped to a Scilab pointer (type name: "pointer", type ID: 128) ? The big advantage of mapping to a <tt>tlist</tt> is that it exposes a new type for the pointer in Scilab, type which can be acessed in Scilab with the <a href="https://help.scilab.org/docs/5.5.2/en_US/typeof.html">typeof</a> function, and manipulated using the <a href="https://help.scilab.org/docs/5.5.2/en_US/overloading.html">overloading</a> mechanism.
@ -1441,7 +1441,7 @@ void throw_exception() throw(char const *) {
<div class="targetlang"><pre> <div class="targetlang"><pre>
--&gt;throw_exception() --&gt;throw_exception()
!--error 999 !--error 999
SWIG/Scilab: Exception (char const *) occured: Bye world ! SWIG/Scilab: Exception (char const *) occurred: Bye world !
</pre></div> </pre></div>
<p> <p>
@ -1458,7 +1458,7 @@ It can be used with the <tt>lasterror()</tt> function as following:
--&gt; lasterror() --&gt; lasterror()
ans = ans =
SWIG/Scilab: Exception (char const *) occured: Bye world ! SWIG/Scilab: Exception (char const *) occurred: Bye world !
</pre></div> </pre></div>
<p> <p>
@ -1488,7 +1488,7 @@ void throw_stl_invalid_arg(int i) throw(std::invalid_argument) {
<div class="targetlang"><pre> <div class="targetlang"><pre>
--&gt; throw_int(); --&gt; throw_int();
!--error 999 !--error 999
SWIG/Scilab: Exception (int) occured: 12 SWIG/Scilab: Exception (int) occurred: 12
--&gt;throw_stl_invalid_arg(-1); --&gt;throw_stl_invalid_arg(-1);
!--error 999 !--error 999

View file

@ -32,7 +32,7 @@ type overwrittenMethodsOnFooBarAbstract struct {
fb FooBarAbstract fb FooBarAbstract
// If additional constructor arguments have been given they are typically // If additional constructor arguments have been given they are typically
// stored here so that the overriden methods can use them. // stored here so that the overridden methods can use them.
} }
func (om *overwrittenMethodsOnFooBarAbstract) Foo() string { func (om *overwrittenMethodsOnFooBarAbstract) Foo() string {
@ -59,7 +59,7 @@ func NewFooBarGo() FooBarGo {
// The memory of the FooBarAbstract director object instance can be // The memory of the FooBarAbstract director object instance can be
// automatically freed once the FooBarGo instance is garbage collected by // automatically freed once the FooBarGo instance is garbage collected by
// uncommenting the following line. Please make sure to understand the // uncommenting the following line. Please make sure to understand the
// runtime.SetFinalizer specific gotchas before doing this. Furthemore // runtime.SetFinalizer specific gotchas before doing this. Furthermore
// DeleteFooBarGo should be deleted if a finalizer is in use or the fooBarGo // DeleteFooBarGo should be deleted if a finalizer is in use or the fooBarGo
// struct needs additional data to prevent double deletion. // struct needs additional data to prevent double deletion.
// runtime.SetFinalizer(fbgs, FooBarGo.deleteFooBarAbstract) // runtime.SetFinalizer(fbgs, FooBarGo.deleteFooBarAbstract)

View file

@ -12,7 +12,7 @@
;;; Explanation: The three lines at the beginning of this script are ;;; Explanation: The three lines at the beginning of this script are
;;; telling the kernel to load the enhanced guile interpreter named ;;; telling the kernel to load the enhanced guile interpreter named
;;; "matrix"; to execute the function "do-test" (-e option) after loading ;;; "matrix"; to execute the function "do-test" (-e option) after loading
;;; this script (-s option). There are a lot more options wich allow for ;;; this script (-s option). There are a lot more options which allow for
;;; even finer tuning. SEE ALSO: Section "Guile Scripts" in the "Guile ;;; even finer tuning. SEE ALSO: Section "Guile Scripts" in the "Guile
;;; reference manual -- Part I: Preliminaries". ;;; reference manual -- Part I: Preliminaries".
;;; ;;;

View file

@ -15,14 +15,14 @@ back to this behavior, use: */
void divide_l(int a, int b, int *OUTPUT, int *OUTPUT); void divide_l(int a, int b, int *OUTPUT, int *OUTPUT);
/* Multiple values as vectors. By issueing: */ /* Multiple values as vectors. By issuing: */
%values_as_vector; %values_as_vector;
/* vectors instead of lists will be used. */ /* vectors instead of lists will be used. */
void divide_v(int a, int b, int *OUTPUT, int *OUTPUT); void divide_v(int a, int b, int *OUTPUT, int *OUTPUT);
/* Multiple values for multiple-value continuations. /* Multiple values for multiple-value continuations.
(This is the most elegant way.) By issueing: */ (This is the most elegant way.) By issuing: */
%multiple_values; %multiple_values;
/* multiple values are passed to the multiple-value /* multiple values are passed to the multiple-value
continuation, as created by `call-with-values' or the continuation, as created by `call-with-values' or the

View file

@ -10,7 +10,7 @@ try{
if(error == -1) { if(error == -1) {
console.log("t.unknown() didn't throw"); console.log("t.unknown() didn't throw");
} else { } else {
console.log("successfully catched throw in Test::unknown()."); console.log("successfully caught throw in Test::unknown().");
} }
} }
@ -22,7 +22,7 @@ catch(error){
if(error == -1) { if(error == -1) {
console.log("t.simple() did not throw"); console.log("t.simple() did not throw");
} else { } else {
console.log("successfully catched throw in Test::simple()."); console.log("successfully caught throw in Test::simple().");
} }
} }
@ -33,7 +33,7 @@ try{
if(error == -1) { if(error == -1) {
console.log("t.message() did not throw"); console.log("t.message() did not throw");
} else { } else {
console.log("successfully catched throw in Test::message()."); console.log("successfully caught throw in Test::message().");
} }
} }
@ -45,7 +45,7 @@ catch(error){
if(error == -1) { if(error == -1) {
console.log("t.hosed() did not throw"); console.log("t.hosed() did not throw");
} else { } else {
console.log("successfully catched throw in Test::hosed()."); console.log("successfully caught throw in Test::hosed().");
} }
} }
@ -58,7 +58,7 @@ for (var i=1; i<4; i++) {
if(error == -1) { if(error == -1) {
console.log("t.multi(" + i + ") did not throw"); console.log("t.multi(" + i + ") did not throw");
} else { } else {
console.log("successfully catched throw in Test::multi()."); console.log("successfully caught throw in Test::multi().");
} }
} }
} }

View file

@ -44,7 +44,7 @@ example.print_vars();
console.log("\nNow I'm going to try and modify some read only variables"); console.log("\nNow I'm going to try and modify some read only variables");
console.log("Tring to set 'path'"); console.log("Trying to set 'path'");
try{ try{
example.path = "Whoa!"; example.path = "Whoa!";
console.log("Hey, what's going on?!?! This shouldn't work"); console.log("Hey, what's going on?!?! This shouldn't work");

View file

@ -1,6 +1,6 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -5,7 +5,7 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -2,7 +2,7 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -16,7 +16,7 @@ and check to see if types Foo and Bar are registered with it
(Bar should be & Foo should not) (Bar should be & Foo should not)
Note: Though both the modules exist and are loaded, they are not linked together, Note: Though both the modules exist and are loaded, they are not linked together,
as they are connected to seperate lua interpreters. as they are connected to separate lua interpreters.
When the third lua state loads both example.i and example2.i, When the third lua state loads both example.i and example2.i,
the two modules are now linked together, and all can now find the two modules are now linked together, and all can now find

View file

@ -2,7 +2,7 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else
@ -48,7 +48,7 @@ else
end end
-- this is a rather strange way to perform the multiple catch of exceptions -- this is a rather strange way to perform the multiple catch of exceptions
print "calling t:mutli()" print "calling t:multi()"
for i=1,3 do for i=1,3 do
ok,res=pcall(function() t:multi(i) end) ok,res=pcall(function() t:multi(i) end)
if ok then if ok then

View file

@ -1,6 +1,6 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -1,6 +1,6 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -1,7 +1,7 @@
-- Operator overloading example -- Operator overloading example
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -3,7 +3,7 @@
print("Testing the %import directive") print("Testing the %import directive")
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
function loadit(a) function loadit(a)
lib=loadlib(a..'.dll','luaopen_'..a) or loadlib(a..'.so','luaopen_'..a) lib=loadlib(a..'.dll','luaopen_'..a) or loadlib(a..'.so','luaopen_'..a)
assert(lib)() assert(lib)()

View file

@ -5,7 +5,7 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -1,7 +1,7 @@
-- Operator overloading example -- Operator overloading example
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -1,6 +1,6 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -1,6 +1,6 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else

View file

@ -1,6 +1,6 @@
---- importing ---- ---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this -- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example') lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)() assert(lib)()
else else
@ -54,9 +54,9 @@ example.print_vars()
print "\nNow I'm going to try and modify some read only variables"; print "\nNow I'm going to try and modify some read only variables";
print " Tring to set 'path' to 'Whoa!'"; print " Trying to set 'path' to 'Whoa!'";
if pcall(function() example.path = "Whoa!" end)==true then if pcall(function() example.path = "Whoa!" end)==true then
print " Thats funny, it didn't give an error!" print " That's funny, it didn't give an error!"
else else
print " It gave an error, as it should" print " It gave an error, as it should"
end end
@ -64,7 +64,7 @@ print(" Just checking the value: path =", example.path)
print " Trying to set 'status' to '0'"; print " Trying to set 'status' to '0'";
if pcall(function() example.status = 0 end)==true then if pcall(function() example.status = 0 end)==true then
print " Thats funny, it didn't give an error!" print " That's funny, it didn't give an error!"
else else
print " It gave an error, as it should" print " It gave an error, as it should"
end end

View file

@ -51,7 +51,7 @@ swigexample.print_vars();
printf("\nNow I'm going to try and modify some read only variables\n"); printf("\nNow I'm going to try and modify some read only variables\n");
printf(" Tring to set 'path'\n"); printf(" Trying to set 'path'\n");
try try
swigexample.cvar.path = "Whoa!"; swigexample.cvar.path = "Whoa!";
printf("Hey, what's going on?!?! This shouldn't work\n"); printf("Hey, what's going on?!?! This shouldn't work\n");

View file

@ -65,7 +65,7 @@ if (!$@) {
} }
print " get error for 'status'\n"; print " get error for 'status'\n";
print " Tring to set 'path'\n"; print " Trying to set 'path'\n";
eval { $example::path = "Whoa!";}; eval { $example::path = "Whoa!";};
if (!$@) { if (!$@) {
die("path"); die("path");

View file

@ -26,7 +26,7 @@ $container->addShape($s);
print "\nA total of " . Shape::nshapes() . " shapes were created\n"; print "\nA total of " . Shape::nshapes() . " shapes were created\n";
# ----- Delete by the old references ----- # ----- Delete by the old references -----
# This should not truely delete the shapes because they are now owned # This should not truly delete the shapes because they are now owned
# by the ShapeContainer. # by the ShapeContainer.
print "Delete the old references."; print "Delete the old references.";
@ -38,7 +38,7 @@ $s = NULL;
print "\nA total of " . Shape::nshapes() . " shapes remain\n"; print "\nA total of " . Shape::nshapes() . " shapes remain\n";
# ----- Delete by the container ----- # ----- Delete by the container -----
# This should truely delete the shapes # This should truly delete the shapes
print "Delete the container."; print "Delete the container.";
$container = NULL; $container = NULL;

View file

@ -26,7 +26,7 @@ $container->addShape($s);
print "\nA total of " . Shape::nshapes() . " shapes were created\n"; print "\nA total of " . Shape::nshapes() . " shapes were created\n";
# ----- Delete by the old references ----- # ----- Delete by the old references -----
# This should not truely delete the shapes because they are now owned # This should not truly delete the shapes because they are now owned
# by the ShapeContainer. # by the ShapeContainer.
print "Delete the old references."; print "Delete the old references.";
@ -38,7 +38,7 @@ $s = NULL;
print "\nA total of " . Shape::nshapes() . " shapes remain\n"; print "\nA total of " . Shape::nshapes() . " shapes remain\n";
# ----- Delete by the container ----- # ----- Delete by the container -----
# This should truely delete the shapes # This should truly delete the shapes
print "Delete the container."; print "Delete the container.";
$container = NULL; $container = NULL;

View file

@ -48,7 +48,7 @@ example.print_vars()
print "\nNow I'm going to try and modify some read only variables" print "\nNow I'm going to try and modify some read only variables"
print " Tring to set 'path'" print " Trying to set 'path'"
try: try:
example.cvar.path = "Whoa!" example.cvar.path = "Whoa!"
print "Hey, what's going on?!?! This shouldn't work" print "Hey, what's going on?!?! This shouldn't work"

View file

@ -48,7 +48,7 @@ Example.print_vars()
puts "\nNow I'm going to try and modify some read only variables"; puts "\nNow I'm going to try and modify some read only variables";
puts " Tring to set 'path'"; puts " Trying to set 'path'";
begin begin
Example.path = "Whoa!" Example.path = "Whoa!"
puts "Hey, what's going on?!?! This shouldn't work" puts "Hey, what's going on?!?! This shouldn't work"

View file

@ -7,7 +7,7 @@ if ierr <> 0 then
end end
example_Init(); example_Init();
// This example shows how to use C++ fonctions with STL lists arguments // This example shows how to use C++ functions with STL lists arguments
// Here, STL lists are converted from/to Scilab matrices (SWIG_SCILAB_EXTRA_NATIVE_CONTAINERS is not defined) // Here, STL lists are converted from/to Scilab matrices (SWIG_SCILAB_EXTRA_NATIVE_CONTAINERS is not defined)
// integer lists // integer lists

View file

@ -49,7 +49,7 @@ print_vars()
// Immutable variables // Immutable variables
printf("\nNow I''m going to try and modify some read only variables\n"); printf("\nNow I''m going to try and modify some read only variables\n");
printf(" Tring to set ''path''\n"); printf(" Trying to set ''path''\n");
try try
path_set("Whoa!"); path_set("Whoa!");
printf("Hey, what''s going on?!?! This shouldn''t work\n"); printf("Hey, what''s going on?!?! This shouldn''t work\n");

View file

@ -48,7 +48,7 @@ print_vars
puts "\nNow I'm going to try and modify some read only variables"; puts "\nNow I'm going to try and modify some read only variables";
puts " Tring to set 'path'"; puts " Trying to set 'path'";
if { [catch { if { [catch {
set path "Whoa!" set path "Whoa!"
puts "Hey, what's going on?!?! This shouldn't work" puts "Hey, what's going on?!?! This shouldn't work"

View file

@ -1,4 +1,4 @@
// Test "Missing identifier for ..." errrors // Test "Missing identifier for ..." errors
%module xxx %module xxx
#ifdef #ifdef

View file

@ -32,8 +32,8 @@ assert(is_std_string(cobj) and cobj:c_str()=="x") -- check type & value
test_const_pointer(cobj) test_const_pointer(cobj)
-- this shouldnt work, but it does -- this shouldn't work, but it does
-- swig doesnt appear to diff between const object ptrs & object ptrs very well -- swig doesn't appear to diff between const object ptrs & object ptrs very well
test_pointer(cobj) -- this wants an non const object (give it a const one!) test_pointer(cobj) -- this wants an non const object (give it a const one!)
-- refs are also wrappered as ptrs (unless the correct typemaps are applied) -- refs are also wrappered as ptrs (unless the correct typemaps are applied)

View file

@ -1,8 +1,8 @@
require("import") -- the import fn require("import") -- the import fn
import("newobject2",true) -- import code import("newobject2",true) -- import code
foo1 = newobject2.makeFoo() -- lua doesnt yet support static fns properly foo1 = newobject2.makeFoo() -- lua doesn't yet support static fns properly
assert(newobject2.fooCount() == 1) -- lua doesnt yet support static fns properly assert(newobject2.fooCount() == 1) -- lua doesn't yet support static fns properly
foo2 = newobject2.makeFoo() foo2 = newobject2.makeFoo()
assert(newobject2.fooCount() == 2) assert(newobject2.fooCount() == 2)

View file

@ -11,14 +11,14 @@ back to this behavior, use: */
void divide_l(int a, int b, int *OUTPUT, int *OUTPUT); void divide_l(int a, int b, int *OUTPUT, int *OUTPUT);
/* Multiple values as vectors. By issueing: */ /* Multiple values as vectors. By issuing: */
%values_as_vector; %values_as_vector;
/* vectors instead of lists will be used. */ /* vectors instead of lists will be used. */
void divide_v(int a, int b, int *OUTPUT, int *OUTPUT); void divide_v(int a, int b, int *OUTPUT, int *OUTPUT);
/* Multiple values for multiple-value continuations. /* Multiple values for multiple-value continuations.
(This is the most elegant way.) By issueing: */ (This is the most elegant way.) By issuing: */
%multiple_values; %multiple_values;
/* multiple values are passed to the multiple-value /* multiple values are passed to the multiple-value
continuation, as created by `call-with-values' or the continuation, as created by `call-with-values' or the

View file

@ -2,10 +2,10 @@ return_const_value
p = return_const_value.Foo_ptr.getPtr(); p = return_const_value.Foo_ptr.getPtr();
if (p.getVal() != 17) if (p.getVal() != 17)
error("Runtime test1 faild. p.getVal()=", p.getVal()) error("Runtime test1 failed. p.getVal()=", p.getVal())
endif endif
p = return_const_value.Foo_ptr.getConstPtr(); p = return_const_value.Foo_ptr.getConstPtr();
if (p.getVal() != 17) if (p.getVal() != 17)
error("Runtime test2 faild. p.getVal()=", p.getVal()) error("Runtime test2 failed. p.getVal()=", p.getVal())
endif endif

View file

@ -119,7 +119,7 @@ class check {
$parents[]=$c; $parents[]=$c;
$c=strtolower(get_parent_class($c)); $c=strtolower(get_parent_class($c));
} }
if ($c!=$b) return check::fail("Class $a does not inherit from class $b\nHierachy:\n %s\n",join("\n ",$parents)); if ($c!=$b) return check::fail("Class $a does not inherit from class $b\nHierarchy:\n %s\n",join("\n ",$parents));
return TRUE; return TRUE;
} }

View file

@ -7,7 +7,7 @@ require "threads_exception.php";
check::functions(array(test_simple,test_message,test_hosed,test_unknown,test_multi,is_python_builtin)); check::functions(array(test_simple,test_message,test_hosed,test_unknown,test_multi,is_python_builtin));
// Check classes. // Check classes.
check::classes(array(Exc,Test,threads_exception)); check::classes(array(Exc,Test,threads_exception));
// Chek globals. // Check globals.
check::globals(array(exc_code,exc_msg)); check::globals(array(exc_code,exc_msg));
$t = new Test(); $t = new Test();

View file

@ -119,7 +119,7 @@ class check {
$parents[]=$c; $parents[]=$c;
$c=strtolower(get_parent_class($c)); $c=strtolower(get_parent_class($c));
} }
if ($c!=$b) return check::fail("Class $a does not inherit from class $b\nHierachy:\n %s\n",join("\n ",$parents)); if ($c!=$b) return check::fail("Class $a does not inherit from class $b\nHierarchy:\n %s\n",join("\n ",$parents));
return TRUE; return TRUE;
} }

View file

@ -7,7 +7,7 @@ require "threads_exception.php";
check::functions(array(test_simple,test_message,test_hosed,test_unknown,test_multi,is_python_builtin)); check::functions(array(test_simple,test_message,test_hosed,test_unknown,test_multi,is_python_builtin));
// Check classes. // Check classes.
check::classes(array(Exc,Test,threads_exception)); check::classes(array(Exc,Test,threads_exception));
// Chek globals. // Check globals.
check::globals(array(exc_code,exc_msg)); check::globals(array(exc_code,exc_msg));
$t = new Test(); $t = new Test();

View file

@ -6,7 +6,7 @@ import sys
if len(sys.argv) >= 2 and sys.argv[1] == "benchmark": if len(sys.argv) >= 2 and sys.argv[1] == "benchmark":
# run the benchmark # run the benchmark
import time import time
k = 1000000 # number of times to excute the functions k = 1000000 # number of times to execute the functions
t = time.time() t = time.time()
a = bytearray(b'hello world') a = bytearray(b'hello world')

View file

@ -3,10 +3,10 @@ import sys
p = return_const_value.Foo_ptr_getPtr() p = return_const_value.Foo_ptr_getPtr()
if (p.getVal() != 17): if (p.getVal() != 17):
print "Runtime test1 faild. p.getVal()=", p.getVal() print "Runtime test1 failed. p.getVal()=", p.getVal()
sys.exit(1) sys.exit(1)
p = return_const_value.Foo_ptr_getConstPtr() p = return_const_value.Foo_ptr_getConstPtr()
if (p.getVal() != 17): if (p.getVal() != 17):
print "Runtime test2 faild. p.getVal()=", p.getVal() print "Runtime test2 failed. p.getVal()=", p.getVal()
sys.exit(1) sys.exit(1)

View file

@ -1,6 +1,6 @@
%module redefined_not %module redefined_not
// These should not emit an Identifer redefined warning // These should not emit an Identifier redefined warning
%inline %{ %inline %{
typedef unsigned int my_size_t; typedef unsigned int my_size_t;
namespace Std { namespace Std {

View file

@ -29,7 +29,7 @@ CPP_STD_TEST_CASES += \
include $(srcdir)/../common.mk include $(srcdir)/../common.mk
# Overriden variables # Overridden variables
SRCDIR = ../$(srcdir)/ SRCDIR = ../$(srcdir)/
# Local variables # Local variables

View file

@ -6,7 +6,7 @@ function checkerror(ierr, cmd)
if ierr <> 0 then swigtesterror("error " + string(ierr) + " in """ + cmd + """"); end if ierr <> 0 then swigtesterror("error " + string(ierr) + " in """ + cmd + """"); end
endfunction endfunction
// test container of pointers returned from fonction (expected a list) // test container of pointers returned from function (expected a list)
function [classAPtr_list, classAPtr1, classAPtr2] = testCreateContainerPtr(container, value1, value2) function [classAPtr_list, classAPtr1, classAPtr2] = testCreateContainerPtr(container, value1, value2)
classAPtr1 = new_ClassA(value1); classAPtr1 = new_ClassA(value1);
classAPtr2 = new_ClassA(value2); classAPtr2 = new_ClassA(value2);
@ -57,7 +57,7 @@ endfunction
// computed on the container // computed on the container
function testContainerType(container, value_type, value1, value2, .. function testContainerType(container, value_type, value1, value2, ..
expected_returned_container, expected_accumulate_value) expected_returned_container, expected_accumulate_value)
// test container of basic type returned from fonction // test container of basic type returned from function
func = msprintf("ret_%s_%s", value_type, container); func = msprintf("ret_%s_%s", value_type, container);
if value_type == "string" then if value_type == "string" then
cmd = msprintf("c = %s(''%s'', ''%s'');", func, value1, value2); cmd = msprintf("c = %s(''%s'', ''%s'');", func, value1, value2);

View file

@ -25,7 +25,7 @@ IntDeque_push_back(intDeque, 6);
avg = average(intDeque); avg = average(intDeque);
checkequal(avg, 4.0, "average(intDeque)"); checkequal(avg, 4.0, "average(intDeque)");
// half shoud return a deque with elements half of the input elements // half should return a deque with elements half of the input elements
RealDeque_clear(realDeque); RealDeque_clear(realDeque);
RealDeque_push_front(realDeque, 2.0); RealDeque_push_front(realDeque, 2.0);
RealDeque_push_front(realDeque, 4.0); RealDeque_push_front(realDeque, 4.0);

View file

@ -2,7 +2,7 @@
exec("swigtest.start", -1); exec("swigtest.start", -1);
// test matrix passed as output argument from fonction // test matrix passed as output argument from function
function test_outMatrix(func, valueType, expectedOutMatrix) function test_outMatrix(func, valueType, expectedOutMatrix)
funcName = msprintf("out%s%s", valueType, func); funcName = msprintf("out%s%s", valueType, func);
cmd = msprintf("outMatrix = %s();", funcName); cmd = msprintf("outMatrix = %s();", funcName);
@ -13,7 +13,7 @@ function test_outMatrix(func, valueType, expectedOutMatrix)
checkequal(outMatrix, expectedOutMatrix, funcName); checkequal(outMatrix, expectedOutMatrix, funcName);
endfunction endfunction
// test matrix passed as input argument of fonction // test matrix passed as input argument of function
function test_inMatrix(func, valueType, inMatrix, expectedInValue) function test_inMatrix(func, valueType, inMatrix, expectedInValue)
funcName = msprintf("in%s%s", valueType, func); funcName = msprintf("in%s%s", valueType, func);
cmd = msprintf("inValue = %s(inMatrix);", funcName); cmd = msprintf("inValue = %s(inMatrix);", funcName);
@ -24,7 +24,7 @@ function test_inMatrix(func, valueType, inMatrix, expectedInValue)
checkequal(inValue, expectedInValue, funcName); checkequal(inValue, expectedInValue, funcName);
endfunction endfunction
// test matrixes passed as input and output arguments of fonction // test matrixes passed as input and output arguments of function
function test_inoutMatrix(func, valueType, inoutMatrix, expectedInoutMatrix) function test_inoutMatrix(func, valueType, inoutMatrix, expectedInoutMatrix)
funcName = msprintf("inout%s%s", valueType, func); funcName = msprintf("inout%s%s", valueType, func);
cmd = msprintf("inoutMatrix = %s(inoutMatrix);", funcName); cmd = msprintf("inoutMatrix = %s(inoutMatrix);", funcName);

View file

@ -8,15 +8,15 @@ endfunction
foo = new_Foo(); foo = new_Foo();
checkException('Foo_test_int(foo)', 'Exception (int) occured: 37'); checkException('Foo_test_int(foo)', 'Exception (int) occurred: 37');
checkException('Foo_test_msg(foo)', 'Exception (char const *) occured: Dead'); checkException('Foo_test_msg(foo)', 'Exception (char const *) occurred: Dead');
checkException('Foo_test_multi(foo, 1)', 'Exception (int) occured: 37'); checkException('Foo_test_multi(foo, 1)', 'Exception (int) occurred: 37');
checkException('Foo_test_multi(foo, 2)', 'Exception (char const *) occured: Dead'); checkException('Foo_test_multi(foo, 2)', 'Exception (char const *) occurred: Dead');
checkException('Foo_test_cls(foo)', 'Exception (CError) occured.'); checkException('Foo_test_cls(foo)', 'Exception (CError) occurred.');
delete_Foo(foo); delete_Foo(foo);

View file

@ -26,7 +26,7 @@ namespace Space {
%template(Bool4False) Space::Bool4<false>; %template(Bool4False) Space::Bool4<false>;
// Forward declarated templates // Forward declared templates
%inline %{ %inline %{
namespace Space { namespace Space {
template <bool B> struct BoolForward1; template <bool B> struct BoolForward1;

View file

@ -7,7 +7,7 @@
%inline %{ %inline %{
// This typedef triggers an inifinite recursion // This typedef triggers an infinite recursion
// in the next test1() nd test2() function declarations // in the next test1() nd test2() function declarations
typedef std::complex<double> complex; typedef std::complex<double> complex;

View file

@ -20,7 +20,7 @@
/* /*
* The SWIG_D_PRIMITIVE macro is used to define the typemaps for the primitive * The SWIG_D_PRIMITIVE macro is used to define the typemaps for the primitive
* types, because are more or less the same for all of them. The few special * types, because are more or less the same for all of them. The few special
* cases are handeled below. * cases are handled below.
*/ */
%define SWIG_D_PRIMITIVE(TYPE, DTYPE) %define SWIG_D_PRIMITIVE(TYPE, DTYPE)
%typemap(ctype) TYPE, const TYPE & "TYPE" %typemap(ctype) TYPE, const TYPE & "TYPE"

View file

@ -388,7 +388,7 @@ static JSStaticFunction $jsmangledname_functions[] = {
* jsc_nspace_declaration: template for a namespace declaration * jsc_nspace_declaration: template for a namespace declaration
* - $jsnspace: mangled name of the namespace * - $jsnspace: mangled name of the namespace
* - $jsglobalvariables: list of variable entries * - $jsglobalvariables: list of variable entries
* - $jsglobalfunctions: list if fuction entries * - $jsglobalfunctions: list of function entries
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
%fragment ("jsc_nspace_declaration", "templates") %fragment ("jsc_nspace_declaration", "templates")
%{ %{

View file

@ -109,11 +109,11 @@ SWIGINTERN void SWIG_V8_Raise(const char *msg) {
Note: There are two contexts for handling errors. Note: There are two contexts for handling errors.
A static V8ErrorHandler is used in not overloaded methods. A static V8ErrorHandler is used in not overloaded methods.
For overloaded methods the throwing type checking mechanism is used For overloaded methods the throwing type checking mechanism is used
during dispatching. As V8 exceptions can not be resetted properly during dispatching. As V8 exceptions can not be reset properly
the trick is to use a dynamic ErrorHandler with same local name as the global the trick is to use a dynamic ErrorHandler with same local name as the global
one. one.
- See defintion of SWIG_Error above. - See definition of SWIG_Error above.
- See code templates 'JS_function_dispatcher', 'JS_functionwrapper_overload', - See code templates 'JS_function_dispatcher', 'JS_functionwrapper_overload',
and 'JS_function_dispatch_case' in javascriptcode.swg and 'JS_function_dispatch_case' in javascriptcode.swg

View file

@ -33,7 +33,7 @@
%typemap(consttab) char *, const char *, char [], const char [] %typemap(consttab) char *, const char *, char [], const char []
{SWIG_LUA_CONSTTAB_STRING("$symname", $value)} {SWIG_LUA_CONSTTAB_STRING("$symname", $value)}
// note: char is treated as a seperate special type // note: char is treated as a separate special type
// signed char & unsigned char are numbers // signed char & unsigned char are numbers
%typemap(consttab) char %typemap(consttab) char
{SWIG_LUA_CONSTTAB_CHAR("$symname", $value)} {SWIG_LUA_CONSTTAB_CHAR("$symname", $value)}

View file

@ -181,7 +181,7 @@ typedef struct swig_elua_entry {
/* Push the string STR on the Lua stack, like lua_pushstring, but /* Push the string STR on the Lua stack, like lua_pushstring, but
prefixed with the location of the innermost Lua call-point prefixed with the location of the innermost Lua call-point
(as formated by luaL_where). */ (as formatted by luaL_where). */
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Lua_pusherrstring (lua_State *L, const char *str) SWIG_Lua_pusherrstring (lua_State *L, const char *str)
{ {
@ -192,7 +192,7 @@ SWIG_Lua_pusherrstring (lua_State *L, const char *str)
/* Push a formatted string generated from FMT and following args on /* Push a formatted string generated from FMT and following args on
the Lua stack, like lua_pushfstring, but prefixed with the the Lua stack, like lua_pushfstring, but prefixed with the
location of the innermost Lua call-point (as formated by luaL_where). */ location of the innermost Lua call-point (as formatted by luaL_where). */
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...) SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
{ {
@ -289,7 +289,7 @@ to tell the two structures apart within SWIG, other than by looking at the type
typedef struct { typedef struct {
swig_type_info *type; swig_type_info *type;
int own; /* 1 if owned & must be destroyed */ int own; /* 1 if owned & must be destroyed */
char data[1]; /* arbitary amount of data */ char data[1]; /* arbitrary amount of data */
} swig_lua_rawdata; } swig_lua_rawdata;
/* Common SWIG API */ /* Common SWIG API */

View file

@ -182,7 +182,7 @@ TYPE* SWIG_get_NAME_num_array_var(lua_State* L, int index, int* size);
// writes a table to Lua with all the specified numbers // writes a table to Lua with all the specified numbers
void SWIG_write_NAME_num_array(lua_State* L,TYPE *array,int size); void SWIG_write_NAME_num_array(lua_State* L,TYPE *array,int size);
// read the specified table, and fills the array with numbers // read the specified table, and fills the array with numbers
// returns 1 of ok (only fails if it doesnt find numbers) // returns 1 of ok (only fails if it doesn't find numbers)
// helper fn (called by SWIG_get_NAME_num_array_*() fns) // helper fn (called by SWIG_get_NAME_num_array_*() fns)
int SWIG_read_NAME_num_array(lua_State* L,int index,TYPE *array,int size); int SWIG_read_NAME_num_array(lua_State* L,int index,TYPE *array,int size);

View file

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* octiterators.swg * octiterators.swg
* *
* Users can derive form the OctSwigIterator to implemet their * Users can derive form the OctSwigIterator to implement their
* own iterators. As an example (real one since we use it for STL/STD * own iterators. As an example (real one since we use it for STL/STD
* containers), the template OctSwigIterator_T does the * containers), the template OctSwigIterator_T does the
* implementation for generic C++ iterators. * implementation for generic C++ iterators.

View file

@ -163,7 +163,7 @@ These methods "may be called" if needed.
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* /*
Enable keywords paramaters Enable keywords parameters
*/ */
#define %kwargs %feature("kwargs") #define %kwargs %feature("kwargs")

View file

@ -3,7 +3,7 @@
* *
* Implement a C++ 'output' iterator for Ruby. * Implement a C++ 'output' iterator for Ruby.
* *
* Users can derive form the Iterator to implemet their * Users can derive form the Iterator to implement their
* own iterators. As an example (real one since we use it for STL/STD * own iterators. As an example (real one since we use it for STL/STD
* containers), the template Iterator_T does the * containers), the template Iterator_T does the
* implementation for generic C++ iterators. * implementation for generic C++ iterators.

View file

@ -11,7 +11,7 @@
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* /*
Enable keywords paramaters Enable keywords parameters
*/ */
#define %kwargs %feature("kwargs") #define %kwargs %feature("kwargs")

View file

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* sciiterators.swg * sciiterators.swg
* *
* Users can derive form the SciSwigIterator to implemet their * Users can derive form the SciSwigIterator to implement their
* own iterators. As an example (real one since we use it for STL/STD * own iterators. As an example (real one since we use it for STL/STD
* containers), the template SwigSciIterator_T does the * containers), the template SwigSciIterator_T does the
* implementation for generic C++ iterators. * implementation for generic C++ iterators.

View file

@ -157,15 +157,15 @@ SWIGRUNTIME void
SWIG_Scilab_Raise_Ex(const char *obj, const char *type, swig_type_info *descriptor) { SWIG_Scilab_Raise_Ex(const char *obj, const char *type, swig_type_info *descriptor) {
if (type) { if (type) {
if (obj) if (obj)
Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured: %s\n", type, obj); Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occurred: %s\n", type, obj);
else else
Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured.\n", type); Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occurred.\n", type);
} }
} }
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) { SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) {
Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured.\n", type); Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occurred.\n", type);
} }
/* Module initialization */ /* Module initialization */

View file

@ -42,7 +42,7 @@ short SIOUXHandleOneEvent _ANSI_ARGS_((EventRecord *event));
* *
* MacintoshInit -- * MacintoshInit --
* *
* This procedure calls Mac specific initilization calls. Most of * This procedure calls Mac specific initialization calls. Most of
* these calls must be made as soon as possible in the startup * these calls must be made as soon as possible in the startup
* process. * process.
* *
@ -64,7 +64,7 @@ MacintoshInit()
/* /*
* Tk needs us to set the qd pointer it uses. This is needed * Tk needs us to set the qd pointer it uses. This is needed
* so Tk doesn't have to assume the availablity of the qd global * so Tk doesn't have to assume the availiblity of the qd global
* variable. Which in turn allows Tk to be used in code resources. * variable. Which in turn allows Tk to be used in code resources.
*/ */
tcl_macQdPtr = &qd; tcl_macQdPtr = &qd;
@ -124,7 +124,7 @@ MacintoshInit()
* *
* SetupMainInterp -- * SetupMainInterp --
* *
* This procedure calls initalization routines require a Tcl * This procedure calls initialization routines require a Tcl
* interp as an argument. This call effectively makes the passed * interp as an argument. This call effectively makes the passed
* iterpreter the "main" interpreter for the application. * iterpreter the "main" interpreter for the application.
* *
@ -133,7 +133,7 @@ MacintoshInit()
* application should probably fail. * application should probably fail.
* *
* Side effects: * Side effects:
* More initilization. * More initialization.
* *
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */

View file

@ -512,7 +512,7 @@ static void add_symbols(Node *n) {
SetFlag(n, "feature:ignore"); SetFlag(n, "feature:ignore");
} }
if (!GetFlag(n, "feature:ignore") && Strcmp(symname,"$ignore") == 0) { if (!GetFlag(n, "feature:ignore") && Strcmp(symname,"$ignore") == 0) {
/* Add feature:ignore if the symbol was explicitely ignored, regardless of visibility */ /* Add feature:ignore if the symbol was explicitly ignored, regardless of visibility */
SetFlag(n, "feature:ignore"); SetFlag(n, "feature:ignore");
} }
} else { } else {
@ -3789,7 +3789,7 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
if ($9) { if ($9) {
appendSibling($$, $9); appendSibling($$, $9);
} }
} else if (!SwigType_istemplate(ty) && template_parameters == 0) { /* for tempalte we need the class itself */ } else if (!SwigType_istemplate(ty) && template_parameters == 0) { /* for template we need the class itself */
$$ = $9; $$ = $9;
} }
} else { } else {

View file

@ -504,7 +504,7 @@ class Allocate:public Dispatcher {
in emit.cxx in emit.cxx
and is either constructued from the "feature:catches" feature and is either constructed from the "feature:catches" feature
or copied from the node "throws" list. or copied from the node "throws" list.
*/ */
String *scatchlist = Getattr(n, "feature:catches"); String *scatchlist = Getattr(n, "feature:catches");

View file

@ -68,8 +68,8 @@ class CSHARP:public Language {
String *module_baseclass; //inheritance for module class from %pragma String *module_baseclass; //inheritance for module class from %pragma
String *imclass_interfaces; //interfaces for intermediary class class from %pragma String *imclass_interfaces; //interfaces for intermediary class class from %pragma
String *module_interfaces; //interfaces for module class from %pragma String *module_interfaces; //interfaces for module class from %pragma
String *imclass_class_modifiers; //class modifiers for intermediary class overriden by %pragma String *imclass_class_modifiers; //class modifiers for intermediary class overridden by %pragma
String *module_class_modifiers; //class modifiers for module class overriden by %pragma String *module_class_modifiers; //class modifiers for module class overridden by %pragma
String *upcasts_code; //C++ casts for inheritance hierarchies C++ code String *upcasts_code; //C++ casts for inheritance hierarchies C++ code
String *imclass_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code String *imclass_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code
String *director_callback_typedefs; // Director function pointer typedefs for callbacks String *director_callback_typedefs; // Director function pointer typedefs for callbacks

View file

@ -989,7 +989,7 @@ public:
// Smart pointer classes do not mirror the inheritance hierarchy of the // Smart pointer classes do not mirror the inheritance hierarchy of the
// underlying types, so aliasing the base class methods in is not required // underlying types, so aliasing the base class methods in is not required
// for them. // for them.
// DMD BUG: We have to emit the alias after the last function becasue // DMD BUG: We have to emit the alias after the last function because
// taking a delegate in the overload checking code fails otherwise // taking a delegate in the overload checking code fails otherwise
// (http://d.puremagic.com/issues/show_bug.cgi?id=4860). // (http://d.puremagic.com/issues/show_bug.cgi?id=4860).
if (!Getattr(n, "sym:nextSibling") && !is_smart_pointer() && if (!Getattr(n, "sym:nextSibling") && !is_smart_pointer() &&
@ -1482,7 +1482,7 @@ public:
} }
Delete(attributes); Delete(attributes);
// Retrive the override value set via %dconstvalue, if any. // Retrieve the override value set via %dconstvalue, if any.
String *override_value = Getattr(n, "feature:d:constvalue"); String *override_value = Getattr(n, "feature:d:constvalue");
if (override_value) { if (override_value) {
Printf(constants_code, "%s;\n", override_value); Printf(constants_code, "%s;\n", override_value);
@ -4353,7 +4353,7 @@ private:
* *
* Determines whether the class the passed function node belongs to overrides * Determines whether the class the passed function node belongs to overrides
* all the overlaods for the passed function node defined somewhere up the * all the overlaods for the passed function node defined somewhere up the
* inheritance hierachy. * inheritance hierarchy.
* --------------------------------------------------------------------------- */ * --------------------------------------------------------------------------- */
bool areAllOverloadsOverridden(Node *n) const { bool areAllOverloadsOverridden(Node *n) const {
List *base_list = Getattr(parentNode(n), "bases"); List *base_list = Getattr(parentNode(n), "bases");
@ -4378,7 +4378,7 @@ private:
} }
// We try to find at least a single overload which exists in the base class // We try to find at least a single overload which exists in the base class
// so we can progress up the inheritance hierachy even if there have been // so we can progress up the inheritance hierarchy even if there have been
// new overloads introduced after the topmost class. // new overloads introduced after the topmost class.
Node *base_function = NULL; Node *base_function = NULL;
String *symname = Getattr(n, "sym:name"); String *symname = Getattr(n, "sym:name");
@ -4404,7 +4404,7 @@ private:
!(Swig_director_mode() && Swig_director_protected_mode() && Swig_all_protected_mode())) { !(Swig_director_mode() && Swig_director_protected_mode() && Swig_all_protected_mode())) {
// If the base class function is »protected« and were are not in // If the base class function is »protected« and were are not in
// director mode, it is not emitted to the base class and thus we do // director mode, it is not emitted to the base class and thus we do
// not count it. Otherwise, we would run into issues if the visiblity // not count it. Otherwise, we would run into issues if the visibility
// of some functions was changed from protected to public in a child // of some functions was changed from protected to public in a child
// class with the using directive. // class with the using directive.
continue; continue;

View file

@ -5940,7 +5940,7 @@ private:
* *
* Given a C/C++ name, return a name in Go which will be exported. * Given a C/C++ name, return a name in Go which will be exported.
* If the first character is an upper case letter, this returns a * If the first character is an upper case letter, this returns a
* copy of its argment. If the first character is a lower case * copy of its argument. If the first character is a lower case
* letter, this forces it to upper case. Otherwise, this prepends * letter, this forces it to upper case. Otherwise, this prepends
* 'X'. * 'X'.
* ---------------------------------------------------------------------- */ * ---------------------------------------------------------------------- */

View file

@ -72,8 +72,8 @@ class JAVA:public Language {
String *module_baseclass; //inheritance for module class from %pragma String *module_baseclass; //inheritance for module class from %pragma
String *imclass_interfaces; //interfaces for intermediary class class from %pragma String *imclass_interfaces; //interfaces for intermediary class class from %pragma
String *module_interfaces; //interfaces for module class from %pragma String *module_interfaces; //interfaces for module class from %pragma
String *imclass_class_modifiers; //class modifiers for intermediary class overriden by %pragma String *imclass_class_modifiers; //class modifiers for intermediary class overridden by %pragma
String *module_class_modifiers; //class modifiers for module class overriden by %pragma String *module_class_modifiers; //class modifiers for module class overridden by %pragma
String *upcasts_code; //C++ casts for inheritance hierarchies C++ code String *upcasts_code; //C++ casts for inheritance hierarchies C++ code
String *imclass_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code String *imclass_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code
String *imclass_directors; // Intermediate class director code String *imclass_directors; // Intermediate class director code
@ -168,7 +168,7 @@ public:
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* constructIntermediateClassName() * constructIntermediateClassName()
* *
* Construct the fully qualified name of the intermidiate class and set * Construct the fully qualified name of the intermediate class and set
* the full_imclass_name attribute accordingly. * the full_imclass_name attribute accordingly.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
void constructIntermediateClassName(Node *n) { void constructIntermediateClassName(Node *n) {

View file

@ -994,7 +994,7 @@ int JSEmitter::emitDtor(Node *n) {
Also, there is a problem where destructor_action is always true for me, even when not requesting %extend as above. Also, there is a problem where destructor_action is always true for me, even when not requesting %extend as above.
So this code doesn't actually quite work as I expect. The end result is that the code still works because So this code doesn't actually quite work as I expect. The end result is that the code still works because
destructor_action calls free like the original template. The one caveat is the string in destructor_action casts to char* which is wierd. destructor_action calls free like the original template. The one caveat is the string in destructor_action casts to char* which is weird.
I think there is a deeper underlying SWIG issue because I don't think it should be char*. However, it doesn't really matter for free. I think there is a deeper underlying SWIG issue because I don't think it should be char*. However, it doesn't really matter for free.
Maybe the fix for the destructor_action always true problem is that this is supposed to be embedded in the if(Extend) block above. Maybe the fix for the destructor_action always true problem is that this is supposed to be embedded in the if(Extend) block above.
@ -1125,7 +1125,7 @@ int JSEmitter::emitConstant(Node *n) {
Template t_getter(getTemplate("js_getter")); Template t_getter(getTemplate("js_getter"));
// call the variable methods as a constants are // call the variable methods as a constants are
// registred in same way // registered in same way
enterVariable(n); enterVariable(n);
state.variable(GETTER, wname); state.variable(GETTER, wname);
// TODO: why do we need this? // TODO: why do we need this?
@ -2428,7 +2428,7 @@ Template & Template::trim() {
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Template& Template::replace(const String* pattern, const String* repl) : * Template& Template::replace(const String* pattern, const String* repl) :
* *
* replaces all occurences of a given pattern with a given replacement. * replaces all occurrences of a given pattern with a given replacement.
* *
* - pattern: the pattern to be replaced * - pattern: the pattern to be replaced
* - repl: the replacement string * - repl: the replacement string

View file

@ -3781,7 +3781,7 @@ int Language::abstractClassTest(Node *n) {
if (dirabstract) { if (dirabstract) {
if (is_public(dirabstract)) { if (is_public(dirabstract)) {
Swig_warning(WARN_LANG_DIRECTOR_ABSTRACT, Getfile(n), Getline(n), Swig_warning(WARN_LANG_DIRECTOR_ABSTRACT, Getfile(n), Getline(n),
"Director class '%s' is abstract, abstract method '%s' is not accesible, maybe due to multiple inheritance or 'nodirector' feature\n", "Director class '%s' is abstract, abstract method '%s' is not accessible, maybe due to multiple inheritance or 'nodirector' feature\n",
SwigType_namestr(Getattr(n, "name")), Getattr(dirabstract, "name")); SwigType_namestr(Getattr(n, "name")), Getattr(dirabstract, "name"));
} else { } else {
Swig_warning(WARN_LANG_DIRECTOR_ABSTRACT, Getfile(n), Getline(n), Swig_warning(WARN_LANG_DIRECTOR_ABSTRACT, Getfile(n), Getline(n),

View file

@ -141,7 +141,7 @@ private:
// This variable holds the name of the current class in Lua. Usually it is // This variable holds the name of the current class in Lua. Usually it is
// the same as C++ class name, but rename directives can change it. // the same as C++ class name, but rename directives can change it.
String *proxy_class_name; String *proxy_class_name;
// This is a so calld fully qualified symname - the above proxy class name // This is a so called fully qualified symname - the above proxy class name
// prepended with class namespace. If class Lua name is the same as class C++ name, // prepended with class namespace. If class Lua name is the same as class C++ name,
// then it is basically C++ fully qualified name with colons replaced with dots. // then it is basically C++ fully qualified name with colons replaced with dots.
String *full_proxy_class_name; String *full_proxy_class_name;
@ -1359,7 +1359,7 @@ public:
String *rt = Copy(getClassType()); String *rt = Copy(getClassType());
SwigType_add_pointer(rt); SwigType_add_pointer(rt);
// Adding class to apropriate namespace // Adding class to appropriate namespace
registerClass(nspace, wrap_class_name); registerClass(nspace, wrap_class_name);
Hash *nspaceHash = getCArraysHash(nspace); Hash *nspaceHash = getCArraysHash(nspace);
@ -1461,7 +1461,7 @@ public:
assert(proxy_class_name); assert(proxy_class_name);
assert(full_proxy_class_name); assert(full_proxy_class_name);
// Then print class isntance part // Then print class instance part
Printv(f_wrappers, "static swig_lua_class *swig_", mangled_full_proxy_class_name, "_bases[] = {", base_class, "0};\n", NIL); Printv(f_wrappers, "static swig_lua_class *swig_", mangled_full_proxy_class_name, "_bases[] = {", base_class, "0};\n", NIL);
Delete(base_class); Delete(base_class);
Printv(f_wrappers, "static const char *swig_", mangled_full_proxy_class_name, "_base_names[] = {", base_class_names, "0};\n", NIL); Printv(f_wrappers, "static const char *swig_", mangled_full_proxy_class_name, "_base_names[] = {", base_class_names, "0};\n", NIL);

View file

@ -219,8 +219,8 @@ private:
String *module_baseclass; //inheritance for module class from %pragma String *module_baseclass; //inheritance for module class from %pragma
String *m3raw_interfaces; //interfaces for intermediary class class from %pragma String *m3raw_interfaces; //interfaces for intermediary class class from %pragma
String *module_interfaces; //interfaces for module class from %pragma String *module_interfaces; //interfaces for module class from %pragma
String *m3raw_class_modifiers; //class modifiers for intermediary class overriden by %pragma String *m3raw_class_modifiers; //class modifiers for intermediary class overridden by %pragma
String *m3wrap_modifiers; //class modifiers for module class overriden by %pragma String *m3wrap_modifiers; //class modifiers for module class overridden by %pragma
String *upcasts_code; //C++ casts for inheritance hierarchies C++ code String *upcasts_code; //C++ casts for inheritance hierarchies C++ code
String *m3raw_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code String *m3raw_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code
String *destructor_call; //C++ destructor call if any String *destructor_call; //C++ destructor call if any
@ -822,7 +822,7 @@ MODULA3():
Printf(file, "\n"); Printf(file, "\n");
Printf(file, "int main (int argc, char *argv[]) {\n"); Printf(file, "int main (int argc, char *argv[]) {\n");
Printf(file, "\ Printf(file, "\
/*This progam must work for floating point numbers and integers.\n\ /*This program must work for floating point numbers and integers.\n\
Thus all numbers are converted to double precision floating point format.*/\n"); Thus all numbers are converted to double precision floating point format.*/\n");
scanConstant(file, n); scanConstant(file, n);
Printf(file, " return 0;\n"); Printf(file, " return 0;\n");
@ -3214,7 +3214,7 @@ MODULA3():
tm = Getattr(p, "tmap:m3wrapargvar"); tm = Getattr(p, "tmap:m3wrapargvar");
if (tm != NIL) { if (tm != NIL) {
/* exceptions that may be raised but can't be catched, /* exceptions that may be raised but can't be caught,
thus we won't count them in num_exceptions */ thus we won't count them in num_exceptions */
addImports(m3wrap_impl.import, "m3wrapargvar", p); addImports(m3wrap_impl.import, "m3wrapargvar", p);
addThrows(throws_hash, "m3wrapargvar", p); addThrows(throws_hash, "m3wrapargvar", p);

View file

@ -765,7 +765,7 @@ public:
/* ------------------------------------------------------------ /* ------------------------------------------------------------
* validIdentifer() * validIdentifier()
* ------------------------------------------------------------ */ * ------------------------------------------------------------ */
virtual int validIdentifier(String *s) { virtual int validIdentifier(String *s) {

View file

@ -436,7 +436,7 @@ private:
String *make_autodoc(Node *n, autodoc_t ad_type) { String *make_autodoc(Node *n, autodoc_t ad_type) {
int extended = 0; int extended = 0;
// If the function is overloaded then this funciton is called // If the function is overloaded then this function is called
// for the last one. Rewind to the first so the docstrings are // for the last one. Rewind to the first so the docstrings are
// in order. // in order.
while (Getattr(n, "sym:previousSibling")) while (Getattr(n, "sym:previousSibling"))

View file

@ -523,7 +523,7 @@ String *Swig_string_ucase(String *s) {
/* We insert a underscore when: /* We insert a underscore when:
1. Lower case char followed by upper case char 1. Lower case char followed by upper case char
getFoo > get_foo; getFOo > get_foo; GETFOO > getfoo getFoo > get_foo; getFOo > get_foo; GETFOO > getfoo
2. Number proceded by char and not end of string 2. Number preceded by char and not end of string
get2D > get_2d; get22D > get_22d; GET2D > get_2d get2D > get_2d; get22D > get_22d; GET2D > get_2d
but: but:
asFloat2 > as_float2 asFloat2 > as_float2

View file

@ -1055,7 +1055,7 @@ static void name_nameobj_add(Hash *name_hash, List *name_list, String *prefix, S
Setattr(nameobj, "decl", decl); Setattr(nameobj, "decl", decl);
if (nname && Len(nname)) if (nname && Len(nname))
Setattr(nameobj, "targetname", nname); Setattr(nameobj, "targetname", nname);
/* put the new nameobj at the beginnig of the list, such that the /* put the new nameobj at the beginning of the list, such that the
last inserted rule take precedence */ last inserted rule take precedence */
Insert(name_list, 0, nameobj); Insert(name_list, 0, nameobj);
} else { } else {

View file

@ -749,11 +749,11 @@ static int look(Scanner *s) {
} }
if (Strcmp( str_delimiter, end_delimiter )==0) { if (Strcmp( str_delimiter, end_delimiter )==0) {
Delete( end_delimiter ); /* Correct end delimiter )XXXX" occured */ Delete( end_delimiter ); /* Correct end delimiter )XXXX" occurred */
Delete( str_delimiter ); Delete( str_delimiter );
str_delimiter = 0; str_delimiter = 0;
return SWIG_TOKEN_STRING; return SWIG_TOKEN_STRING;
} else { /* Incorrect end delimiter occured */ } else { /* Incorrect end delimiter occurred */
if (c == 0) { if (c == 0) {
Swig_error(cparse_file, cparse_start_line, "Unterminated raw string, started with R\"%s( is not terminated by )%s\"\n", str_delimiter, str_delimiter); Swig_error(cparse_file, cparse_start_line, "Unterminated raw string, started with R\"%s( is not terminated by )%s\"\n", str_delimiter, str_delimiter);
return SWIG_TOKEN_ERROR; return SWIG_TOKEN_ERROR;

View file

@ -188,7 +188,7 @@ extern "C" {
extern SwigType *SwigType_remove_global_scope_prefix(const SwigType *t); extern SwigType *SwigType_remove_global_scope_prefix(const SwigType *t);
extern SwigType *SwigType_alttype(const SwigType *t, int ltmap); extern SwigType *SwigType_alttype(const SwigType *t, int ltmap);
/* --- Type-system managment --- */ /* --- Type-system management --- */
extern void SwigType_typesystem_init(void); extern void SwigType_typesystem_init(void);
extern int SwigType_typedef(const SwigType *type, const_String_or_char_ptr name); extern int SwigType_typedef(const SwigType *type, const_String_or_char_ptr name);
extern int SwigType_typedef_class(const_String_or_char_ptr name); extern int SwigType_typedef_class(const_String_or_char_ptr name);

View file

@ -50,7 +50,7 @@ extern void Scanner_locator(Scanner *, String *loc);
#define SWIG_TOKEN_COLON 12 /* : */ #define SWIG_TOKEN_COLON 12 /* : */
#define SWIG_TOKEN_DCOLON 13 /* :: */ #define SWIG_TOKEN_DCOLON 13 /* :: */
#define SWIG_TOKEN_DCOLONSTAR 14 /* ::* */ #define SWIG_TOKEN_DCOLONSTAR 14 /* ::* */
#define SWIG_TOKEN_ID 15 /* identifer */ #define SWIG_TOKEN_ID 15 /* identifier */
#define SWIG_TOKEN_FLOAT 16 /* 3.1415F */ #define SWIG_TOKEN_FLOAT 16 /* 3.1415F */
#define SWIG_TOKEN_DOUBLE 17 /* 3.1415 */ #define SWIG_TOKEN_DOUBLE 17 /* 3.1415 */
#define SWIG_TOKEN_INT 18 /* 314 */ #define SWIG_TOKEN_INT 18 /* 314 */

View file

@ -570,7 +570,7 @@ static SwigType *_typedef_resolve(Typetab *s, String *base, int look_parent) {
List *inherit; List *inherit;
Typetab *parent; Typetab *parent;
/* if (!s) return 0; *//* now is checked bellow */ /* if (!s) return 0; *//* now is checked below */
/* Printf(stdout,"Typetab %s : %s\n", Getattr(s,"name"), base); */ /* Printf(stdout,"Typetab %s : %s\n", Getattr(s,"name"), base); */
if (!Getmark(s)) { if (!Getmark(s)) {