summaryrefslogtreecommitdiff
path: root/Examples/lua
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-02-26 18:36:12 +1300
committerOlly Betts <olly@survex.com>2022-02-27 18:15:46 +1300
commitb127e11f1e58f4948d0e75667cb797e6f5a797a0 (patch)
tree6f9c7f4862f28656f563fa40f7fc114bd83e8995 /Examples/lua
parentb5544a181276a3d258cea6deaa6ff875d1e580fc (diff)
downloadswig-b127e11f1e58f4948d0e75667cb797e6f5a797a0.tar.gz
Fix typos in docs and comments
Diffstat (limited to 'Examples/lua')
-rw-r--r--Examples/lua/arrays/example.i4
-rw-r--r--Examples/lua/embed2/embed2.c4
-rw-r--r--Examples/lua/embed3/embed3.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/Examples/lua/arrays/example.i b/Examples/lua/arrays/example.i
index eafd8ff55..54bc31bde 100644
--- a/Examples/lua/arrays/example.i
+++ b/Examples/lua/arrays/example.i
@@ -9,12 +9,12 @@ See the lua code for how they are called
%include <carrays.i> // array helpers
-// this declares a batch of function for manipulating C integer arrays
+// this declares a batch of functions for manipulating C integer arrays
%array_functions(int,int)
// this adds some lua code directly into the module
// warning: you need the example. prefix if you want it added into the module
-// admittedly this code is a bit tedious, but its a one off effort
+// admittedly this code is a bit tedious, but it's a one off effort
%luacode {
function example.sort_int2(t)
-- local len=table.maxn(t) -- the len - maxn deprecated in 5.3
diff --git a/Examples/lua/embed2/embed2.c b/Examples/lua/embed2/embed2.c
index 23a05e95a..5507877e5 100644
--- a/Examples/lua/embed2/embed2.c
+++ b/Examples/lua/embed2/embed2.c
@@ -41,7 +41,7 @@ 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 involved.
+ it's 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) {
@@ -75,7 +75,7 @@ int call_add(lua_State *L,int a,int b,int* res) {
return 1;
}
-/* This is a variargs call function for calling from C into Lua.
+/* This is a varargs call function for calling from C into Lua.
Original Code from Programming in Lua (PIL) by Roberto Ierusalimschy
ISBN 85-903798-1-7
http://www.lua.org/pil/25.3.html
diff --git a/Examples/lua/embed3/embed3.cpp b/Examples/lua/embed3/embed3.cpp
index 9be49add3..c3c5d380c 100644
--- a/Examples/lua/embed3/embed3.cpp
+++ b/Examples/lua/embed3/embed3.cpp
@@ -61,7 +61,7 @@ bool push_pointer(lua_State*L, void* ptr, const char* type_name, int owned = 0)
/* This is an example of how to call the Lua function
void onEvent(Event e)
- its very tedious, but gives you an idea of the issues involed.
+ it's very tedious, but gives you an idea of the issues involved.
*/
int call_onEvent(lua_State *L, Event e) {
int top;
@@ -105,7 +105,7 @@ int main(int argc, char* argv[]) {
/* this code will pass a pointer into lua, but C++ still owns the object
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
+ and a flag which states if Lua should delete the pointer once it's finished with it
The type name is a class name string which is registered with SWIG
(normally, just look in the wrapper file to get this)
in this case we don't want Lua to delete the pointer so the ownership flag is 0