Fix typos in docs and comments
This commit is contained in:
parent
b5544a1812
commit
b127e11f1e
27 changed files with 46 additions and 46 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue