From 05ff62fcc29d11cc43e23d6912b55ee05be600ca Mon Sep 17 00:00:00 2001
From: Olly Betts
-These attributes are associated with the C/C++ parameter type or return type, which is subtely different to +These attributes are associated with the C/C++ parameter type or return type, which is subtly different to the attribute features and typemaps covered next. Note that all these different C# attributes can be combined so that a method has more than one attribute.
@@ -380,7 +380,7 @@ However anyone wishing to do this should be familiar with the contents of the seUnfortunately a C# exception cannot simply be thrown from unmanaged code for a variety of reasons. -Most noteably being that throwing a C# exception results in exceptions being thrown across the C PInvoke interface and C does not understand exceptions. +Most notably being that throwing a C# exception results in exceptions being thrown across the C PInvoke interface and C does not understand exceptions. The design revolves around a C# exception being constructed and stored as a pending exception, to be thrown only when the unmanaged code has completed. Implementing this is a tad involved and there are thus some unusual typemap constructs. Some practical examples follow and they should be read in conjunction with the rest of this section. diff --git a/Doc/Manual/Chicken.html b/Doc/Manual/Chicken.html index 761db3256..bd1b3d94b 100644 --- a/Doc/Manual/Chicken.html +++ b/Doc/Manual/Chicken.html @@ -321,7 +321,7 @@
Primitive symbols and functions (the interface that would be presented if - -proxy was not passed) are hidden and no longer accessable. If the -unhideprimitive + -proxy was not passed) are hidden and no longer accessible. If the -unhideprimitive command line argument is passed to SWIG, then the primitive symbols will be available, but each will be prefixed by the string "primitive:" @@ -379,7 +379,7 @@ $ csc -sv example.scm example_wrap.c example_impl.c -o example.so -
The exmaple.so file can then linked with test_script.scm when it +
The example.so file can then linked with test_script.scm when it
is compiled, in which case test_script.scm must have (declare (uses example)).
Multiple SWIG modules could have been linked into example.so and each
one accessed with a (declare (uses ... )).
@@ -441,7 +441,7 @@ $ csc -sv mod_load.scm mod1.scm mod2.scm mod1_wrap.c mod2_wrap.c mod1_impl.c mod
Then the extension library can be loaded with (require 'mod). As we can see here,
-mod_load.scm contains the code that gets exectued when the module is loaded. All this code
+mod_load.scm contains the code that gets executed when the module is loaded. All this code
does is load both mod1 and mod2. As we can see, this technique is more useful when you want to
combine a few SWIG modules into one chicken extension library, especially if modules are related by
%import
-Some of the variables AC_SUBSTitutued are essential to the +Some of the variables AC_SUBSTituted are essential to the support of your language module. Fashion these into a shell script "test" clause and assign that to a skip tag using "-z" and "-o":
diff --git a/Doc/Manual/Introduction.html b/Doc/Manual/Introduction.html index 25c88f497..491204d1d 100644 --- a/Doc/Manual/Introduction.html +++ b/Doc/Manual/Introduction.html @@ -441,7 +441,7 @@ smart and that tools should just stay out of their way. Because of that, you will find that SWIG is extremely permissive in what it lets you get away with. In fact, you can use SWIG to go well beyond "shooting yourself in the foot" if dangerous programming is your goal. -On the other hand, this kind of freedoom may be exactly what is needed +On the other hand, this kind of freedom may be exactly what is needed to work with complicated and unusual C/C++ applications. diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html index e549d1198..5a27ba137 100644 --- a/Doc/Manual/Java.html +++ b/Doc/Manual/Java.html @@ -844,7 +844,7 @@ Be careful using the %javaconst(1) directive as not all C code will com The example demonstrates how you can target particular constants (BIG and LARGE) with %javaconst. SWIG doesn't use %javaconst(1) as the default as it tries to generate code that will always compile. However, using a %javaconst(1) at the top of your interface file is strongly recommended as the preferred compile time constants -will be generated and most C constants will compile as Java code and in anycase the odd constant that doesn't can be fixed using %javaconst(0). +will be generated and most C constants will compile as Java code and in any case the odd constant that doesn't can be fixed using %javaconst(0).@@ -2008,7 +2008,7 @@ In the previous section, a high-level view of Java wrapping was presented. A key component of this wrapping is that structures and classes are wrapped by Java proxy classes and type wrapper classes are used in situations where no proxies are generated. This provides a very -natural, type safe Java interface to the C/C++ code and fits in with the Java programing paradigm. +natural, type safe Java interface to the C/C++ code and fits in with the Java programming paradigm. However, a number of low-level details were omitted. This section provides a brief overview of how the proxy classes work and then covers the type wrapper classes. Finally enum classes are covered. @@ -2194,7 +2194,7 @@ The jniclasscode pragma is quite useful for adding in a static block fo
-Pragmas will take either "" or %{ %} as delimeters. +Pragmas will take either "" or %{ %} as delimiters. For example, let's change the intermediary JNI class access to public.
@@ -2668,7 +2668,7 @@ Some not so ideal solutions are:-Call the System.runFinalizersOnExit(true) or Runtime.getRuntime().runFinalizersOnExit(true) to ensure the finalizers are called before the program exits. The catch is that this is a deprecated function call as the documenation says:
+Call the System.runFinalizersOnExit(true) or Runtime.getRuntime().runFinalizersOnExit(true) to ensure the finalizers are called before the program exits. The catch is that this is a deprecated function call as the documentation says:Call the delete() function manually which will immediately invoke the C++ destructor. -As a suggestion it may be a good idea to set the object to null so that should the object be inadvertantly used again a Java null pointer exception is thrown, the alternative would crash the JVM by using a null C pointer. +As a suggestion it may be a good idea to set the object to null so that should the object be inadvertently used again a Java null pointer exception is thrown, the alternative would crash the JVM by using a null C pointer. For example given a SWIG generated class A:
A myA = new A();
@@ -3172,7 +3172,7 @@ void callup(DirectorBase *director) {
The following directorDerived Java class is derived from the Java proxy class DirectorBase and overrides upcall_method().
When C++ code invokes upcall_method(), the SWIG-generated C++ code redirects the call via JNI to the Java directorDerived subclass.
-Naturally, the SWIG generated C++ code and the generated Java intermediate class marshall and convert arguments between C++ and Java when needed.
+Naturally, the SWIG generated C++ code and the generated Java intermediate class marshal and convert arguments between C++ and Java when needed.
@@ -5394,7 +5394,7 @@ bool calculate(float first, float second);
-To validate every float being passed to C++, we could preceed the code being wrapped by the following typemap which throws a runtime exception whenever the float is 'Not a Number':
+To validate every float being passed to C++, we could precede the code being wrapped by the following typemap which throws a runtime exception whenever the float is 'Not a Number':
@@ -5440,7 +5440,7 @@ public class example {
Note that the "javain" typemap is used for every occurrence of a float being used as an input.
-Of course, we could have targetted the typemap at a particular parameter by using float first, say, instead of just float.
+Of course, we could have targeted the typemap at a particular parameter by using float first, say, instead of just float.
If we decide that what we actually want is a checked exception instead of a runtime exception, we can change this easily enough.
The proxy method that uses float as an input, must then add the exception class to the throws clause.
SWIG can handle this as it supports the 'throws' typemap attribute for specifying classes for the throws clause.
@@ -6632,7 +6632,7 @@ public static void MyClass_method_upcall(MyClass self, long jarg1,
- The current "type symmetry" design will work for simple C++ inheritance, but will most likely fail for anything more compicated such as tree or diamond C++ inheritance hierarchies.
+ The current "type symmetry" design will work for simple C++ inheritance, but will most likely fail for anything more complicated such as tree or diamond C++ inheritance hierarchies.
Those who are interested in challenging problems are more than welcome to hack the Java::Java_director_declaration method in Source/Modules/java.cxx.
@@ -6679,7 +6679,7 @@ public class FooDerived extends Foo {
}
catch (ClassCastException exc) {
- // Wasn't a FooDerived object, some other sublcass of Foo
+ // Wasn't a FooDerived object, some other subclass of Foo
return null;
}
}
@@ -6730,7 +6730,7 @@ public abstract class UserVisibleFoo extends Foo {
}
catch (ClassCastException exc) {
- // Wasn't a FooDerived object, some other sublcass of Foo
+ // Wasn't a FooDerived object, some other subclass of Foo
return null;
}
}
diff --git a/Doc/Manual/Library.html b/Doc/Manual/Library.html
index 40bee2ca5..586e1ecab 100644
--- a/Doc/Manual/Library.html
+++ b/Doc/Manual/Library.html
@@ -1645,7 +1645,7 @@ void foo(vector<int> *x, const Vector &x);
Note: This module makes use of several advanced SWIG features including templatized typemaps
-and template partial specialization. If you are tring to wrap other C++ code with templates, you
+and template partial specialization. If you are trying to wrap other C++ code with templates, you
might look at the code contained in std_vector.i. Alternatively, you can show them the code
if you want to make their head explode.
diff --git a/Doc/Manual/Modula3.html b/Doc/Manual/Modula3.html
index 591347537..ff70fc143 100644
--- a/Doc/Manual/Modula3.html
+++ b/Doc/Manual/Modula3.html
@@ -99,7 +99,7 @@ to high level scripting languages like Python.
Although scripting languages are designed
to make programming life easier
by hiding machine internals from the programmer
-there are several aspects of todays scripting languages
+there are several aspects of today's scripting languages
that are unfavourable in my opinion.
@@ -579,7 +579,7 @@ Disable generation of interfaces and wrappers.
Instead generate suggestions for %rename.
C libraries use a naming style
-that is neither homogenous nor similar to that of Modula-3.
+that is neither homogeneous nor similar to that of Modula-3.
C function names often contain a prefix denoting the library
and some name components separated by underscores
or capitalization changes.
diff --git a/Doc/Manual/Ocaml.html b/Doc/Manual/Ocaml.html
index 725e54a6d..79ede443f 100644
--- a/Doc/Manual/Ocaml.html
+++ b/Doc/Manual/Ocaml.html
@@ -63,13 +63,13 @@
support of Ocaml. Ocaml is a relatively recent addition to the ML family,
and is a recent addition to SWIG. It's the second compiled, typed
language to be added. Ocaml has widely acknowledged benefits for engineers,
-mostly derived from a sophistocated type system, compile-time checking
+mostly derived from a sophisticated type system, compile-time checking
which eliminates several classes of common programming errors, and good
native performance. While all of this is wonderful, there are well-written
C and C++ libraries that Ocaml users will want to take advantage of as
part of their arsenal (such as SSL and gdbm), as well as their own mature
C and C++ code. SWIG allows this code to be used in a natural, type-safe
-way with Ocaml, by providing the necessary, but repetetive glue code
+way with Ocaml, by providing the necessary, but repetitive glue code
which creates and uses Ocaml values to communicate with C and C++ code.
In addition, SWIG also produces the needed Ocaml source that binds
variants, functions, classes, etc.
@@ -264,7 +264,7 @@ Most code meant to be compiled as C++ will not have problems.
In order to provide access to overloaded functions, and
-provide sensible outputs from them, all C entites are represented as
+provide sensible outputs from them, all C entities are represented as
members of the c_obj type:
@@ -338,7 +338,7 @@ is that you must append them to the return list with swig_result = caml_list_a
]). This is in order to make return values easier to handle
when functions have only one return value, such as constructors,
and operators. In addition, string, pointer, and object
- values are interchangable with respect to caml_ptr_val, so you can
+ values are interchangeable with respect to caml_ptr_val, so you can
allocate memory as caml strings and still use the resulting
pointers for C purposes, even using them to construct simple objects
on. Note, though, that foreign C++ code does not respect the garbage
@@ -518,7 +518,7 @@ since the object can provide bounds checking, etc., that prevents crashes.
Consider writing an object when the ending condition of your array is complex,
-such as using a required centinel, etc.
+such as using a required sentinel, etc.
25.2.3.4 Example typemap for a function taking float * and int
@@ -809,7 +809,7 @@ certain function, all you need to do is to define the function that will
handle the method calls in terms of the public methods of the object, and
any other relevant information. The function new_derived_object
uses a stub class to call your methods in place of the ones provided by the
-underlying implemenation. The object you receive is the underlying object,
+underlying implementation. The object you receive is the underlying object,
so you are free to call any methods you want from within your derived method.
Note that calls to the underlying object do not invoke Ocaml code. You need
to handle that yourself.
@@ -970,7 +970,7 @@ to receive a value from the called function, as well as sending one there.
Sometimes, this is the main purpose of the argument given. directorargout
typemaps allow your caml code to emulate this by specifying additional return
values to be put into the output parameters. The SWIG ocaml module is a bit
-loose in order to make code eaiser to write. In this case, your return to
+loose in order to make code easier to write. In this case, your return to
the caller must be a list containing the normal function return first, followed
by any argout values in order. These argout values will be taken from the
list and assigned to the values to be returned to C++ through directorargout typemaps.
diff --git a/Doc/Manual/Perl5.html b/Doc/Manual/Perl5.html
index 26a0f4b61..d954abc0e 100644
--- a/Doc/Manual/Perl5.html
+++ b/Doc/Manual/Perl5.html
@@ -171,7 +171,7 @@ loaded, an easy way to find out is to run Perl itself.
The preferred approach to building an extension module is to compile it into
a shared object file or DLL. To do this, you will need to compile your program
-using comands like this (shown for Linux):
+using commands like this (shown for Linux):
@@ -275,7 +275,7 @@ The same thing can be accomplished by running SWIG as follows :
-The permain.i file inserts Perl's main() function
+The perlmain.i file inserts Perl's main() function
into the wrapper code and automatically initializes the SWIG generated
module. If you just want to make a quick a dirty module, this may be
the easiest way. By default, the perlmain.i code does not
@@ -567,7 +567,7 @@ can behave strangely when working with multiple modules.
-It should be noted that you may get alot of error messages
+It should be noted that you may get a lot of error messages
about the `bool' datatype when compiling a C++ Perl module. If
you experience this problem, you can try the following :
@@ -1178,7 +1178,7 @@ void spam(Foo *f);
then the function spam() accepts Foo * or a pointer to any class derived from Foo.
-If necesssary, the type-checker also adjusts the value of the pointer (as is necessary when
+If necessary, the type-checker also adjusts the value of the pointer (as is necessary when
multiple inheritance is used).
@@ -1272,7 +1272,7 @@ print example::fact(4),"\n" # Call a function in it
Usually, a module consists of a collection of code that is contained
within a single file. A package, on the other hand, is the Perl
-equivalent of a namespace. A package is alot like a module, except
+equivalent of a namespace. A package is a lot like a module, except
that it is independent of files. Any number of files may be part of
the same package--or a package may be broken up into a collection of
modules if you prefer to think about it in this way.
@@ -1813,7 +1813,7 @@ int count(char c, char *str, unsigned len);
When a multi-argument typemap is defined, the arguments are always handled as a single
Perl object. This allows the function to be used like this (notice how the length
-parameter is ommitted):
+parameter is omitted):
@@ -2009,7 +2009,7 @@ When writing typemaps, it is necessary to work directly with Perl5
objects. This, unfortunately, can be a daunting task. Consult the
"perlguts" man-page for all of the really ugly details. A short
summary of commonly used functions is provided here for reference. It
-should be stressed that SWIG can be usef quite effectively without
+should be stressed that SWIG can be used quite effectively without
knowing any of these details--especially now that there are typemap
libraries that can already been written.
@@ -2684,7 +2684,7 @@ In fact, it will fail if you create a new C object in Perl, pass it on
to a C function that remembers the object, and then destroy the
corresponding Perl object (this situation turns out to come up
frequently when constructing objects like linked lists and trees).
-When C takes possession of an object, you can change Perl's owership
+When C takes possession of an object, you can change Perl's ownership
by simply deleting the object from the %OWNER hash. This is
done using the DISOWN method.
diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html
index ce4622b6a..f29f8669d 100644
--- a/Doc/Manual/Preprocessor.html
+++ b/Doc/Manual/Preprocessor.html
@@ -57,7 +57,7 @@ is not necessary to use include-guards in SWIG interfaces.
By default, the #include is ignored unless you run SWIG with the
-includeall option. The reason for ignoring traditional includes
is that you often don't want SWIG to try and wrap everything included
-in standard header system headers and auxilliary files.
+in standard header system headers and auxiliary files.
7.2 File imports
diff --git a/Doc/Manual/Ruby.html b/Doc/Manual/Ruby.html
index 6e8e65aac..407c2b648 100644
--- a/Doc/Manual/Ruby.html
+++ b/Doc/Manual/Ruby.html
@@ -1285,7 +1285,7 @@ irb(main):003:0> puts foo.value
30.6.3 Exception classes
- Starting with SWIG 1.3.28, the Ruby module supports the %exceptionclass directive, which is used to identify C++ classes that are used as exceptions. Classes that are marked with the %exceptionclass directive are exposed in Ruby as child classes of rb_eRuntimeError. This alows C++ exceptions to be directly mapped to Ruby exceptions, providing for a more natural integration between C++ code and Ruby code.
+ Starting with SWIG 1.3.28, the Ruby module supports the %exceptionclass directive, which is used to identify C++ classes that are used as exceptions. Classes that are marked with the %exceptionclass directive are exposed in Ruby as child classes of rb_eRuntimeError. This allows C++ exceptions to be directly mapped to Ruby exceptions, providing for a more natural integration between C++ code and Ruby code.
%exceptionclass CustomError;
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html
index e17a7c8b4..8186f9e13 100644
--- a/Doc/Manual/SWIG.html
+++ b/Doc/Manual/SWIG.html
@@ -1830,7 +1830,7 @@ constants in the target scripting language. This allows you to use them as foll
-Unfortunately, by declaring the callback functions as constants, they are no longer accesible
+Unfortunately, by declaring the callback functions as constants, they are no longer accessible
as functions. For example:
@@ -2335,7 +2335,7 @@ typedef struct {
-You can make a Vector look alot like a class by writing a SWIG interface like this:
+You can make a Vector look a lot like a class by writing a SWIG interface like this:
@@ -2471,7 +2471,7 @@ const double Vector_magnitude_get(Vector *v) {
-Now, for all practial purposes, magnitude will appear like an attribute
+Now, for all practical purposes, magnitude will appear like an attribute
of the object.
@@ -2940,7 +2940,7 @@ are several reasons why you might want to do this:
- It is rarely necessary to access every single function in a large
package. Many C functions might have little or no use in a scripted
-environment. Therfore, why wrap them?
+environment. Therefore, why wrap them?
- Separate interface files provide an opportunity to provide more
precise rules about how an interface is to be constructed.
diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html
index df9a9a248..d678bf586 100644
--- a/Doc/Manual/SWIGPlus.html
+++ b/Doc/Manual/SWIGPlus.html
@@ -2276,7 +2276,7 @@ also apply to %ignore. For example:
-When applied to a base class, %ignore forces all definitions in derived clases
+When applied to a base class, %ignore forces all definitions in derived classes
to disappear. For example, %ignore Spam::foo(double) will eliminate foo(double) in
Spam and all classes derived from Spam.
@@ -3082,7 +3082,7 @@ Don't worry--if you get the order wrong, SWIG should generate a warning message.
-Occassionally, you may need to tell SWIG about base classes that are defined by templates,
+Occasionally, you may need to tell SWIG about base classes that are defined by templates,
but which aren't supposed to be wrapped. Since SWIG is not able to automatically
instantiate templates for this purpose, you must do it manually. To do this, simply
use %template with no name. For example:
diff --git a/Doc/Manual/Scripting.html b/Doc/Manual/Scripting.html
index d451bf097..e6a2eee24 100644
--- a/Doc/Manual/Scripting.html
+++ b/Doc/Manual/Scripting.html
@@ -171,7 +171,7 @@ different.
Variable linking refers to the problem of mapping a
C/C++ global variable to a variable in the scripting
-language interpeter. For example, suppose you had the following
+language interpreter. For example, suppose you had the following
variable:
diff --git a/Doc/Manual/Tcl.html b/Doc/Manual/Tcl.html
index 0988321e7..6435d9e68 100644
--- a/Doc/Manual/Tcl.html
+++ b/Doc/Manual/Tcl.html
@@ -132,7 +132,7 @@ header file.
The preferred approach to building an extension module is to compile it into
a shared object file or DLL. To do this, you will need to compile your program
-using comands like this (shown for Linux):
+using commands like this (shown for Linux):
@@ -167,7 +167,7 @@ The name of the module is specified using the %module directive or the
An alternative approach to dynamic linking is to rebuild the Tcl
interpreter with your extension module added to it. In the past,
-this approach was sometimes necesssary due to limitations in dynamic loading
+this approach was sometimes necessary due to limitations in dynamic loading
support on certain machines. However, the situation has improved greatly
over the last few years and you should not consider this approach
unless there is really no other option.
@@ -869,7 +869,7 @@ proc blah {} {
When an identifier name is given, it is used to perform an implicit hash-table lookup of the value during argument
-conversion. This allows the global statement to be ommitted.
+conversion. This allows the global statement to be omitted.
31.3.5 Pointers
@@ -2557,7 +2557,7 @@ int count(char c, char *str, int len);
When a multi-argument typemap is defined, the arguments are always handled as a single
Tcl object. This allows the function to be used like this (notice how the length
-parameter is ommitted):
+parameter is omitted):
@@ -3312,7 +3312,7 @@ proc new {objectType handle_r args} {
#
# Also creates a procedure for the object and a trace on
# the handle variable that deletes the object when the
- # handle varibale is overwritten or unset
+ # handle variable is overwritten or unset
upvar $handle_r handle
#
# Create the new object
diff --git a/Doc/Manual/Varargs.html b/Doc/Manual/Varargs.html
index 54408ab87..f40a1ff1f 100644
--- a/Doc/Manual/Varargs.html
+++ b/Doc/Manual/Varargs.html
@@ -198,7 +198,7 @@ int wrap_printf(const char *fmt, ...) {
-Athough this code might compile, it won't do what you expect. This is
+Although this code might compile, it won't do what you expect. This is
because the call to printf() is compiled as a procedure call
involving only two arguments. However, clearly a two-argument
configuration of the call stack is completely wrong if your intent is
diff --git a/Doc/Manual/Windows.html b/Doc/Manual/Windows.html
index ad7305de2..0b1f13ad3 100644
--- a/Doc/Manual/Windows.html
+++ b/Doc/Manual/Windows.html
@@ -100,7 +100,7 @@ The required environment variables are displayed with their current values.
The list of required environment variables for each module language is also listed below.
They are usually set from the Control Panel and System properties, but this depends on which flavour of Windows you are running.
-If you don't want to use environment variables then change all occurences of the environment variables in the .dsp files with hard coded values.
+If you don't want to use environment variables then change all occurrences of the environment variables in the .dsp files with hard coded values.
If you are interested in how the project files are set up there is explanatory information in some of the language module's documentation.