summaryrefslogtreecommitdiff
path: root/Doc/Manual/Lua.html
diff options
context:
space:
mode:
authorMark Gossage <mark@gossage.cjb.net>2007-07-05 01:31:51 +0000
committerMark Gossage <mark@gossage.cjb.net>2007-07-05 01:31:51 +0000
commitc3ec8fdce3fa20a496ec50e5da4d69bfcc6faca6 (patch)
treecb504c0e393f031a3e306c411dd4529b8d109a09 /Doc/Manual/Lua.html
parentd269f9cd169a4b438c623dfeb4607670474ca42d (diff)
downloadswig-c3ec8fdce3fa20a496ec50e5da4d69bfcc6faca6.tar.gz
[lua] Fix a bug in SWIG_ALLOC_ARRAY()
improved the error messages for incorrect arguments. Changed the output of swig_type() to use the human readable form of the type, rather than the raw swig type. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Doc/Manual/Lua.html')
-rw-r--r--Doc/Manual/Lua.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/Manual/Lua.html b/Doc/Manual/Lua.html
index 5abe6502a..1ecf058d7 100644
--- a/Doc/Manual/Lua.html
+++ b/Doc/Manual/Lua.html
@@ -399,7 +399,7 @@ Unlike many scripting languages, Lua has had support for pointers to C/C++ objec
&gt; print(f)
userdata: 003FDA80
&gt; print(swig_type(f))
-_p_FILE -- its a FILE*
+FILE * -- its a FILE*
</pre></div>
<p>
Lua enforces the integrity of its userdata, so it is virtually impossible to corrupt the data. But as the user of the pointer, you are responsible for freeing it, or closing any resources associated with it (just as you would in a C program). This does not apply so strictly to classes &amp; structs (see below). One final note: if a function returns a NULL pointer, this is not encoded as a userdata, but as a Lua nil.
@@ -1087,7 +1087,7 @@ __index function: 003FB698
.fn table: 003FB528
</pre></div>
<p>
-The '.type' attribute is the string which is returned from a call to swig_type(). The '.get' and '.set' tables work in a similar manner to the modules, the main difference is the '.fn' table which also holds all the member functions. (The '__gc' function is the classes destructor function)
+The '.type' attribute is the name of the class. The '.get' and '.set' tables work in a similar manner to the modules, the main difference is the '.fn' table which also holds all the member functions. (The '__gc' function is the classes destructor function)
</p>
<p>
The Lua equivalent of the code for enabling functions looks a little like this