fix #1188207 and uniform the error/null/none handling

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7225 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-05-26 20:43:33 +00:00
commit a2f5af9ddd
5 changed files with 11 additions and 17 deletions

View file

@ -132,8 +132,8 @@ SWIGINTERNINLINE PyObject *
SWIG_FromWCharArray(const wchar_t * carray, size_t size)
{
if (size > INT_MAX) {
SWIG_NewPointerObj(SWIG_const_cast(carray,wchar_t *), SWIG_TypeQuery("wchar_t *"), 0);
return Py_None;
return SWIG_NewPointerObj(SWIG_const_cast(carray,wchar_t *),
SWIG_TypeQuery("wchar_t *"), 0);
} else {
return PyUnicode_FromWideChar(carray, SWIG_numeric_cast(size,int));
}