[lua] updated docs for exceptions

added new examples (exception,embed2)
update typmaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10300 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Mark Gossage 2008-03-06 09:44:48 +00:00
commit 8350c724f5
18 changed files with 749 additions and 149 deletions

View file

@ -73,15 +73,15 @@
%{$1 = (lua_toboolean(L, $input)!=0);%}
%typemap(out) bool
%{ lua_pushboolean(L,(int)$1); SWIG_arg++;%}
%{ lua_pushboolean(L,(int)($1==true)); SWIG_arg++;%}
// for const bool&, SWIG treats this as a const bool* so we must dereference it
%typemap(in,checkfn="lua_isboolean") const bool& (bool temp)
%{temp=lua_toboolean(L, $input) ? true : false;
%{temp=(lua_toboolean(L, $input)!=0);
$1=&temp;%}
%typemap(out) const bool&
%{ lua_pushboolean(L,(int)*$1); SWIG_arg++;%}
%{ lua_pushboolean(L,(int)(*$1==true)); SWIG_arg++;%}
// strings (char* and char[])
%typemap(in,checkfn="lua_isstring") const char*, char*