summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2014-04-29 11:24:04 +1200
committerOlly Betts <olly@survex.com>2014-04-29 11:31:29 +1200
commit618868ce3dbbde24bff185afea0c019d031cf857 (patch)
tree7e582f9dc3fc68d78e2f20bdc0fe05be1cabb739
parent4c86f17bcb151bf01e01577ee288ca415274829a (diff)
downloadswig-618868ce3dbbde24bff185afea0c019d031cf857.tar.gz
Fix typos
-rw-r--r--CHANGES6
-rw-r--r--Doc/Manual/Lua.html2
-rw-r--r--Doc/Manual/Ruby.html2
-rw-r--r--Examples/lua/arrays/runme.lua2
-rw-r--r--Examples/lua/dual/dual.cpp6
-rw-r--r--Examples/lua/embed/embed.c18
-rw-r--r--Examples/lua/embed/runme.lua6
-rw-r--r--Examples/lua/embed2/embed2.c16
-rw-r--r--Examples/lua/embed2/runme.lua6
-rw-r--r--Examples/lua/embed3/embed3.cpp14
-rw-r--r--Examples/lua/embed3/example.h2
-rw-r--r--Examples/lua/embed3/runme.lua10
-rw-r--r--Examples/lua/exception/runme.lua4
-rw-r--r--Examples/lua/owner/runme.lua14
-rw-r--r--Examples/test-suite/d/operator_overload_runme.2.d2
-rw-r--r--Source/Modules/lua.cxx18
-rw-r--r--Source/Modules/r.cxx2
17 files changed, 65 insertions, 65 deletions
diff --git a/CHANGES b/CHANGES
index 297da776f..821d76b2c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9970,7 +9970,7 @@ Version 1.3.23 (November 11, 2004)
- Remove the ability to share type information by using c linking.
All type sharing happens through a global variable in the target language.
+ Remove SWIG_NOIMPORT, SWIG_RUNTIME, and related defines.
- + Depreciate -runtime, -noruntime command line options
+ + Deprecate -runtime, -noruntime command line options
+ Update test-suite common.mk to correctly build multicpptest
+ Remove reference to precommon.swg
+ Update the guile_gh interface to share data by a global var instead
@@ -21212,9 +21212,9 @@ Version 1.3 Alpha 1 (February 11, 2000)
*** POTENTIAL INCOMPATIBILITY ***
1/30/00 : loic
- Conditionaly compile experimental code with --enable-experiment
+ Conditionally compile experimental code with --enable-experiment
configure flag.
- Fix .cvsignore to ignore configrue & yacc generated files
+ Fix .cvsignore to ignore configure & yacc generated files
1/28/00 : loic
Apply automake everywhere
diff --git a/Doc/Manual/Lua.html b/Doc/Manual/Lua.html
index 2d4c1a2f3..c67e08834 100644
--- a/Doc/Manual/Lua.html
+++ b/Doc/Manual/Lua.html
@@ -1056,7 +1056,7 @@ operators and pseudo-operators):</p>
<li><tt>__len__</tt>
<li><tt>__getitem__</tt>
<li><tt>__setitem__</tt>
-<li><tt>__tostring</tt> used internaly by Lua for tostring() function. __str__ is mapped to this function
+<li><tt>__tostring</tt> used internally by Lua for tostring() function. __str__ is mapped to this function
</ul>
<p>No other lua metafunction is inherited. For example, __gc is not inherited and must be redefined in every class. <tt>__tostring</tt> is subject to a special handling. If absent in class and in class bases, a default one will be provided by SWIG</p>
</p>
diff --git a/Doc/Manual/Ruby.html b/Doc/Manual/Ruby.html
index 3fc45834d..9719239a9 100644
--- a/Doc/Manual/Ruby.html
+++ b/Doc/Manual/Ruby.html
@@ -4690,7 +4690,7 @@ public:
C++ constructor, thus creating a new <tt>foo</tt> object.
By default, SWIG will assign the new Ruby object a "free" function.
When the Ruby object is garbage collected, the "free" function will be
-called. It in turn will call <tt>Foo's</tt> destructor.</p>
+called. It in turn will call <tt>Foo</tt>'s destructor.</p>
<p>Next, consider this code: </p>
diff --git a/Examples/lua/arrays/runme.lua b/Examples/lua/arrays/runme.lua
index 7ab6dc42b..d0aa99813 100644
--- a/Examples/lua/arrays/runme.lua
+++ b/Examples/lua/arrays/runme.lua
@@ -25,7 +25,7 @@ math.randomseed(0) -- init random
--[[ version 1: passing a C array to the code
-lets test call sort_int()
+let's test call sort_int()
this requires a C array, so is the hardest to use]]
ARRAY_SIZE=10
arr=example.new_int(ARRAY_SIZE)
diff --git a/Examples/lua/dual/dual.cpp b/Examples/lua/dual/dual.cpp
index ad7897953..b54e44de1 100644
--- a/Examples/lua/dual/dual.cpp
+++ b/Examples/lua/dual/dual.cpp
@@ -1,7 +1,7 @@
/*
-dual.cpp a test for multiple modules and multiple intrepreters staticly linked together.
+dual.cpp a test for multiple modules and multiple interpreters statically linked together.
-Earlier version of lua bindings for SWIG would fail if staticly linked.
+Earlier version of lua bindings for SWIG would fail if statically linked.
What is happening is as follows:
example.i declares a type Foo
@@ -28,7 +28,7 @@ both Foo and Bar.
#include <stdio.h>
#include <stdlib.h>
-// the 2 libraries which are wrappered via SWIG
+// the 2 libraries which are wrapped via SWIG
extern "C" int luaopen_example(lua_State*L);
extern "C" int luaopen_example2(lua_State*L);
diff --git a/Examples/lua/embed/embed.c b/Examples/lua/embed/embed.c
index f21c933a5..507567489 100644
--- a/Examples/lua/embed/embed.c
+++ b/Examples/lua/embed/embed.c
@@ -1,9 +1,9 @@
-/* embed.c a simple test for an embeded interpreter
+/* embed.c a simple test for an embedded interpreter
The idea is that we wrapper a few simple function (example.c)
and write our own app to call it.
-What it will do is load the wrappered lib, load runme.lua and then call some functions.
+What it will do is load the wrapped lib, load runme.lua and then call some functions.
To make life easier, all the printf's have either [C] or [Lua] at the start
so you can see where they are coming from.
@@ -28,8 +28,8 @@ extern int luaopen_example(lua_State*L);
/* a really simple way of calling lua from C
just give it a lua state & a string to execute
Unfortunately lua keeps changing its API's.
-In lua 5.0.X its lua_dostring()
-In lua 5.1.X its luaL_dostring()
+In lua 5.0.X it's lua_dostring()
+In lua 5.1.X it's luaL_dostring()
so we have a few extra compiles
*/
int dostring(lua_State *L, char* str) {
@@ -58,11 +58,11 @@ int main(int argc,char* argv[]) {
luaopen_base(L);
luaopen_string(L);
luaopen_math(L);
- printf("[C] now loading the SWIG wrappered library\n");
+ printf("[C] now loading the SWIG wrapped library\n");
luaopen_example(L);
printf("[C] all looks ok\n");
printf("\n");
- printf("[C] lets load the file 'runme.lua'\n");
+ printf("[C] let's load the file 'runme.lua'\n");
printf("[C] any lua code in this file will be executed\n");
if (luaL_loadfile(L, "runme.lua") || lua_pcall(L, 0, 0, 0)) {
printf("[C] ERROR: cannot run lua file: %s",lua_tostring(L, -1));
@@ -70,16 +70,16 @@ int main(int argc,char* argv[]) {
}
printf("[C] We are now back in C, all looks ok\n");
printf("\n");
- printf("[C] lets call the function 'do_tests()'\n");
+ printf("[C] let's call the function 'do_tests()'\n");
ok=dostring(L,"do_tests()");
printf("[C] We are back in C, the dostring() function returned %d\n",ok);
printf("\n");
- printf("[C] Lets call lua again, but create an error\n");
+ printf("[C] Let's call lua again, but create an error\n");
ok=dostring(L,"no_such_function()");
printf("[C] We are back in C, the dostring() function returned %d\n",ok);
printf("[C] it should also have returned 1 and printed an error message\n");
printf("\n");
- printf("[C] Lets call lua again, calling the greeting function\n");
+ printf("[C] Let's call lua again, calling the greeting function\n");
ok=dostring(L,"call_greeting()");
printf("[C] This was C=>Lua=>C (getting a bit complex)\n");
printf("\n");
diff --git a/Examples/lua/embed/runme.lua b/Examples/lua/embed/runme.lua
index e02fd1d55..a75f74000 100644
--- a/Examples/lua/embed/runme.lua
+++ b/Examples/lua/embed/runme.lua
@@ -1,7 +1,7 @@
print "[lua] This is runme.lua"
--- test program for embeded lua
--- we do not need to load the library, as it was already in the intrepreter
--- but lets check anyway
+-- test program for embedded lua
+-- we do not need to load the library, as it was already in the interpreter
+-- but let's check anyway
assert(type(example)=='table',"Don't appear to have loaded the example module")
-- a test function to run the tests
diff --git a/Examples/lua/embed2/embed2.c b/Examples/lua/embed2/embed2.c
index 3145d3b10..100a1fb33 100644
--- a/Examples/lua/embed2/embed2.c
+++ b/Examples/lua/embed2/embed2.c
@@ -1,9 +1,9 @@
-/* embed2.c some more test for an embeded interpreter
+/* embed2.c some more tests for an embedded interpreter
This will go a bit further as it will pass values to and from the lua code.
It uses less of the SWIG code, and more of the raw lua API's
-What it will do is load the wrappered lib, load runme.lua and then call some functions.
+What it will do is load the wrapped lib, load runme.lua and then call some functions.
To make life easier, all the printf's have either [C] or [Lua] at the start
so you can see where they are coming from.
@@ -35,12 +35,12 @@ We will be using the luaL_dostring()/lua_dostring() function to call into lua
#define lua_open luaL_newstate
#endif
-/* the SWIG wrappered library */
+/* the SWIG wrapped library */
extern int luaopen_example(lua_State*L);
/* This is an example of how to call the Lua function
int add(int,int)
- its very tedious, but gives you an idea of the issues involded.
+ its very tedious, but gives you an idea of the issues involved.
(look below for a better idea)
*/
int call_add(lua_State *L,int a,int b,int* res) {
@@ -78,7 +78,7 @@ int call_add(lua_State *L,int a,int b,int* res) {
Original Code from Programming in Lua (PIL) by Roberto Ierusalimschy
ISBN 85-903798-1-7
http://www.lua.org/pil/25.3.html
-This has been modified slightly to make it compile, and its still a bit rough.
+This has been modified slightly to make it compile, and it's still a bit rough.
But it gives the idea of how to make it work.
*/
int call_va (lua_State *L,const char *func, const char *sig, ...) {
@@ -189,7 +189,7 @@ int main(int argc,char* argv[]) {
luaopen_example(L);
printf("[C] all looks ok\n");
printf("\n");
- printf("[C] lets load the file 'runme.lua'\n");
+ printf("[C] let's load the file 'runme.lua'\n");
printf("[C] any lua code in this file will be executed\n");
if (luaL_loadfile(L, "runme.lua") || lua_pcall(L, 0, 0, 0)) {
printf("[C] ERROR: cannot run lua file: %s",lua_tostring(L, -1));
@@ -197,12 +197,12 @@ int main(int argc,char* argv[]) {
}
printf("[C] We are now back in C, all looks ok\n");
printf("\n");
- printf("[C] lets call the Lua function 'add(1,1)'\n");
+ printf("[C] let's call the Lua function 'add(1,1)'\n");
printf("[C] using the C function 'call_add'\n");
ok=call_add(L,1,1,&res);
printf("[C] the function returned %d with value %d\n",ok,res);
printf("\n");
- printf("[C] lets do this rather easier\n");
+ printf("[C] let's do this rather easier\n");
printf("[C] we will call the same Lua function using a generic C function 'call_va'\n");
ok=call_va(L,"add","ii>i",1,1,&res);
printf("[C] the function returned %d with value %d\n",ok,res);
diff --git a/Examples/lua/embed2/runme.lua b/Examples/lua/embed2/runme.lua
index 73af9c5f2..9e7ab616c 100644
--- a/Examples/lua/embed2/runme.lua
+++ b/Examples/lua/embed2/runme.lua
@@ -1,7 +1,7 @@
print "[lua] This is runme.lua"
--- test program for embeded lua
--- we do not need to load the library, as it was already in the intrepreter
--- but lets check anyway
+-- test program for embedded lua
+-- we do not need to load the library, as it was already in the interpreter
+-- but let's check anyway
assert(type(example)=='table',"Don't appear to have loaded the example module")
-- note: we will copy the functions from example table into global
diff --git a/Examples/lua/embed3/embed3.cpp b/Examples/lua/embed3/embed3.cpp
index cdf56268d..d559167d1 100644
--- a/Examples/lua/embed3/embed3.cpp
+++ b/Examples/lua/embed3/embed3.cpp
@@ -1,4 +1,4 @@
-/* embed3.cpp A C++ embeded interpreter
+/* embed3.cpp A C++ embedded interpreter
This will register a C++ class with Lua, and then call a Lua function
passing C++ objects to this function.
@@ -33,12 +33,12 @@ extern "C" {
/* The SWIG external runtime is generated by using.
swig -lua -externalruntime swigluarun.h
-It contains useful function used by SWIG in its wrappering
+It contains useful function used by SWIG in its wrapper
SWIG_TypeQuery() SWIG_NewPointerObj()
*/
#include "swigluarun.h" // the SWIG external runtime
-/* the SWIG wrappered library */
+/* the SWIG wrapped library */
extern "C" int luaopen_example(lua_State*L);
// the code itself
@@ -100,10 +100,10 @@ int main(int argc, char* argv[]) {
luaopen_example(L);
printf("[C++] all looks ok\n");
printf("\n");
- printf("[C++] lets create an Engine and pass a pointer to Lua\n");
+ printf("[C++] let's create an Engine and pass a pointer to Lua\n");
Engine engine;
/* this code will pass a pointer into lua, but C++ still owns the object
- this is a little tedious, to do, but lets do it
+ this is a little tedious, to do, but let's do it
we need to pass the pointer (obviously), the type name
and a flag which states if Lua should delete the pointer once its finished with it
The type name is a class name string which is registered with SWIG
@@ -113,7 +113,7 @@ int main(int argc, char* argv[]) {
push_pointer(L,&engine,"Engine *",0);
lua_setglobal(L, "pEngine"); // set as global variable
- printf("[C++] now lets load the file 'runme.lua'\n");
+ printf("[C++] now let's load the file 'runme.lua'\n");
printf("[C++] any lua code in this file will be executed\n");
if (luaL_loadfile(L, "runme.lua") || lua_pcall(L, 0, 0, 0)) {
printf("[C++] ERROR: cannot run lua file: %s", lua_tostring(L, -1));
@@ -122,7 +122,7 @@ int main(int argc, char* argv[]) {
printf("[C++] We are now back in C++, all looks ok\n");
printf("\n");
- printf("[C++] Lets call the Lua function onEvent(e)\n");
+ printf("[C++] Let's call the Lua function onEvent(e)\n");
printf("[C++] We will give it different events, as we wish\n");
printf("[C++] Starting with STARTUP\n");
Event ev;
diff --git a/Examples/lua/embed3/example.h b/Examples/lua/embed3/example.h
index 41c13e9c1..df189e34b 100644
--- a/Examples/lua/embed3/example.h
+++ b/Examples/lua/embed3/example.h
@@ -13,7 +13,7 @@ public:
};
-/* We also want to pass some events to Lua, so lets have a few classes
+/* We also want to pass some events to Lua, so let's have a few classes
to do this.
*/
class Event
diff --git a/Examples/lua/embed3/runme.lua b/Examples/lua/embed3/runme.lua
index 3a44bd2fc..8d5b1eada 100644
--- a/Examples/lua/embed3/runme.lua
+++ b/Examples/lua/embed3/runme.lua
@@ -1,7 +1,7 @@
print "[lua] This is runme.lua"
--- test program for embeded lua
--- we do not need to load the library, as it was already in the intrepreter
--- but lets check anyway
+-- test program for embedded lua
+-- we do not need to load the library, as it was already in the interpreter
+-- but let's check anyway
assert(type(example)=='table',"Don't appear to have loaded the example module. Do not run this file directly, run the embed3 executable")
@@ -13,12 +13,12 @@ else
end
--- the embed program expects a function void onEvent(Event)
+-- the embedded program expects a function void onEvent(Event)
-- this is it
function onEvent(e)
print("[Lua] onEvent with event",e.mType)
- -- lets do something with the Engine
+ -- let's do something with the Engine
-- nothing clever, but ...
if e.mType==example.Event_STARTUP then
pEngine:start()
diff --git a/Examples/lua/exception/runme.lua b/Examples/lua/exception/runme.lua
index d8125caec..a798efca7 100644
--- a/Examples/lua/exception/runme.lua
+++ b/Examples/lua/exception/runme.lua
@@ -70,7 +70,7 @@ function b()
t:message()
end
print [[
-Now lets call function a()
+Now let's call function a()
which calls b()
which calls into C++
which will throw an exception!]]
@@ -80,7 +80,7 @@ if ok then
else
print(" call failed with error:",res)
end
-print "Now lets do the same using xpcall(a,debug.traceback)"
+print "Now let's do the same using xpcall(a,debug.traceback)"
ok,res=xpcall(a,debug.traceback)
if ok then
print " that worked! Funny"
diff --git a/Examples/lua/owner/runme.lua b/Examples/lua/owner/runme.lua
index ed745f7b2..847645448 100644
--- a/Examples/lua/owner/runme.lua
+++ b/Examples/lua/owner/runme.lua
@@ -9,15 +9,15 @@ else
require('example')
end
-print "ok, lets test Lua's ownership of C++ objects"
+print "ok, let's test Lua's ownership of C++ objects"
print("Currently there are",example.Shape_nshapes,"shapes (there should be 0)")
-print "\nLets make a couple"
+print "\nLet's make a couple"
a=example.Square(10)
b=example.Circle(1)
print("Currently there are",example.Shape_nshapes,"shapes (there should be 2)")
-print "\nNote lets use the createX functions"
+print "\nNote let's use the createX functions"
c=example.createCircle(5)
d=example.createSquare(3)
print("Currently there are",example.Shape_nshapes,"shapes (there should be 4)")
@@ -26,12 +26,12 @@ print "\nWe will run the garbage collector & see if they are till here"
collectgarbage()
print("Currently there are",example.Shape_nshapes,"shapes (there should be 4)")
-print "\nLets get rid of them all, collect garbage & see if they are till here"
+print "\nLet's get rid of them all, collect garbage & see if they are till here"
a,b,c,d=nil,nil,nil,nil
collectgarbage()
print("Currently there are",example.Shape_nshapes,"shapes (there should be 0)")
-print "\nLets start putting stuff into the ShapeOwner"
+print "\nLet's start putting stuff into the ShapeOwner"
print "The ShapeOwner now owns the shapes, but Lua still has pointers to them"
o=example.ShapeOwner()
a=example.Square(10)
@@ -41,7 +41,7 @@ o:add(b)
o:add(example.createSquare(5))
print("Currently there are",example.Shape_nshapes,"shapes (there should be 3)")
-print "\nWe will nil our references,run the garbage collector & see if they are till here"
+print "\nWe will nil our references,run the garbage collector & see if they are still here"
print "they should be, as the ShapeOwner owns them"
a,b=nil,nil
collectgarbage()
@@ -101,4 +101,4 @@ print "done"
o,sh=nil,nil
collectgarbage()
print("Currently there are",example.Shape_nshapes,"shapes (there should be 0)")
-print "thats all folks!"
+print "that's all folks!"
diff --git a/Examples/test-suite/d/operator_overload_runme.2.d b/Examples/test-suite/d/operator_overload_runme.2.d
index 2ff61cd56..d05265e58 100644
--- a/Examples/test-suite/d/operator_overload_runme.2.d
+++ b/Examples/test-suite/d/operator_overload_runme.2.d
@@ -53,7 +53,7 @@ void main() {
assert(-a == a);
assert(-b == new Op(-5));
- // Unfortunaly, there is no way to override conversion to boolean for
+ // Unfortunately, there is no way to override conversion to boolean for
// classes in D, opCast!("bool") is only used for structs.
// test []
diff --git a/Source/Modules/lua.cxx b/Source/Modules/lua.cxx
index 1e99205bc..ad4ba1925 100644
--- a/Source/Modules/lua.cxx
+++ b/Source/Modules/lua.cxx
@@ -205,7 +205,7 @@ public:
}
/* NEW LANGUAGE NOTE:***********************************************
- This is called to initalise the system & read any command line args
+ This is called to initialise the system & read any command line args
most of this is boilerplate code, except the command line args
which depends upon what args your code supports
NEW LANGUAGE NOTE:END *********************************************** */
@@ -380,7 +380,7 @@ public:
Dump(f_header, f_begin);
Dump(f_wrappers, f_begin);
Dump(f_initbeforefunc, f_begin);
- /* for the Lua code it needs to be properly excaped to be added into the C/C++ code */
+ /* for the Lua code it needs to be properly escaped to be added into the C/C++ code */
escapeCode(s_luacode);
Printf(f_begin, "const char* SWIG_LUACODE=\n \"%s\";\n\n", s_luacode);
Wrapper_pretty_print(f_init, f_begin);
@@ -436,9 +436,9 @@ public:
/* NEW LANGUAGE NOTE:***********************************************
This is it!
you get this one right, and most of your work is done
- but its going to take soem file to get it working right
+ but its going to take some file to get it working right
quite a bit of this is generally boilerplate code
- (or stuff I dont understand)
+ (or stuff I don't understand)
that which matters will have extra added comments
NEW LANGUAGE NOTE:END *********************************************** */
/* ---------------------------------------------------------------------
@@ -534,7 +534,7 @@ public:
}
/* NEW LANGUAGE NOTE:***********************************************
- the wrapper object holds all the wrappering code
+ the wrapper object holds all the wrapper code
we need to add a couple of local variables
NEW LANGUAGE NOTE:END *********************************************** */
Wrapper *f = NewWrapper();
@@ -554,7 +554,7 @@ public:
/* NEW LANGUAGE NOTE:***********************************************
the format of a lua fn is:
static int wrap_XXX(lua_State* L){...}
- this line adds this into the wrappering code
+ this line adds this into the wrapper code
NEW LANGUAGE NOTE:END *********************************************** */
Printv(f->def, "static int ", wname, "(lua_State* L) {", NIL);
@@ -657,7 +657,7 @@ public:
continue;
} else {
/* NEW LANGUAGE NOTE:***********************************************
- // why is this code not called when I dont have a typemap?
+ // why is this code not called when I don't have a typemap?
// instead of giving a warning, no code is generated
NEW LANGUAGE NOTE:END *********************************************** */
Swig_warning(WARN_TYPEMAP_IN_UNDEF, input_file, line_number, "Unable to use type %s as a function argument.\n", SwigType_str(pt, 0));
@@ -792,7 +792,7 @@ public:
Replaceall(f->code, "$result", Swig_cresult_name());
/* Dump the function out */
- /* in Lua we will not emit the destructor as a wrappered function,
+ /* in Lua we will not emit the destructor as a wrapper function,
Lua will automatically call the destructor when the object is free'd
However: you cannot just skip this function as it will not emit
any custom destructor (using %extend), as you need to call emit_action()
@@ -835,7 +835,7 @@ public:
/* NEW LANGUAGE NOTE:***********************************************
This is an extra function used for overloading of functions
it checks the args & then calls the relevant fn
- nost of the real work in again typemaps:
+ most of the real work in again typemaps:
look for %typecheck(SWIG_TYPECHECK_*) in the .swg file
NEW LANGUAGE NOTE:END *********************************************** */
int dispatchFunction(Node *n) {
diff --git a/Source/Modules/r.cxx b/Source/Modules/r.cxx
index ca8577375..0a3fb722b 100644
--- a/Source/Modules/r.cxx
+++ b/Source/Modules/r.cxx
@@ -2160,7 +2160,7 @@ int R::functionWrapper(Node *n) {
/* If we are dealing with a method in an C++ class, then
add the name of the R function and its definition.
XXX need to figure out how to store the Wrapper if possible in the hash/list.
- Would like to be able to do this so that we can potentialy insert
+ Would like to be able to do this so that we can potentially insert
*/
if(processing_member_access_function || processing_class_member_function) {
addAccessor(member_name, sfun, iname);