Fix comment typos in Lua typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13132 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9a758998c9
commit
5b2f38101f
11 changed files with 42 additions and 42 deletions
|
|
@ -8,7 +8,7 @@
|
|||
* Basic function pointer support
|
||||
* ----------------------------------------------------------------------------- */
|
||||
/*
|
||||
The structure: SWIGLUA_FN provides a simple (local only) wrappering for a function.
|
||||
The structure: SWIGLUA_FN provides a simple (local only) wrapping for a function.
|
||||
|
||||
For example if you wanted to have a C/C++ function take a lua function as a parameter.
|
||||
You could declare it as:
|
||||
|
|
@ -29,7 +29,7 @@ just push the parameters, call the function and return the result.
|
|||
return luaL_checknumber(fn.L,-1);
|
||||
}
|
||||
|
||||
SWIG will automatically performs the wrappering of the arguments in and out.
|
||||
SWIG will automatically performs the wrapping of the arguments in and out.
|
||||
|
||||
However: if you wish to store the function between calls, look to the SWIGLUA_REF below.
|
||||
|
||||
|
|
@ -64,8 +64,8 @@ Then call it later, You could declare it as:
|
|||
note: it should be passed by value, not byref or as a pointer.
|
||||
|
||||
The SWIGLUA_REF holds a pointer to the lua_State, and an integer reference to the object.
|
||||
Because it holds a permenet ref to an object, the SWIGLUA_REF must be handled with a bit more care.
|
||||
It should be initalised to {0,0}. The function swiglua_ref_set() should be used to set it.
|
||||
Because it holds a permanent ref to an object, the SWIGLUA_REF must be handled with a bit more care.
|
||||
It should be initialised to {0,0}. The function swiglua_ref_set() should be used to set it.
|
||||
swiglua_ref_clear() should be used to clear it when not in use, and swiglua_ref_get() to get the
|
||||
data back.
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ if you need that you must add it yourself.
|
|||
return luaL_checknumber(fn.L,-1);
|
||||
}
|
||||
|
||||
SWIG will automatically performs the wrappering of the arguments in and out.
|
||||
SWIG will automatically performs the wrapping of the arguments in and out.
|
||||
|
||||
However: if you wish to store the function between calls, look to the SWIGLUA_REF below.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue