Fix SWIG_lua_isnilstring multiply defined when using multiple modules and wrapping strings. Patch from 'Number Cruncher'.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12114 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-06-10 19:21:07 +00:00
commit f10c7868fd
2 changed files with 10 additions and 6 deletions

View file

@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.1 (in progress)
===========================
2010-06-10: wsfulton
[Lua] Fix SWIG_lua_isnilstring multiply defined when using multiple
modules and wrapping strings. Patch from 'Number Cruncher'.
2010-06-10: olly
[PHP] Fix directors to correctly call a method with has a
different name in PHP to C++ (we were always using the C++ name

View file

@ -91,12 +91,12 @@ temp=($basetype)lua_tonumber(L,$input); $1=&temp;%}
// strings (char * and char[])
%fragment("SWIG_lua_isnilstring", "header") {
int SWIG_lua_isnilstring(lua_State *L, int idx) {
int ret = lua_isstring(L, idx);
if (!ret)
ret = lua_isnil(L, idx);
return ret;
}
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
int ret = lua_isstring(L, idx);
if (!ret)
ret = lua_isnil(L, idx);
return ret;
}
}
%typemap(in,checkfn="SWIG_lua_isnilstring",fragment="SWIG_lua_isnilstring") const char *, char *