A small unicode fix.

A partial fix for the problem with overloading, varargs,
and fastunpack: with this fix, the wrappers will compile.
However, they still contain faulty logic and unreachable
code in the dispatch function.

The comprehensive fix would have to be in overload.cxx.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12465 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Stefan Zager 2011-02-17 05:52:18 +00:00
commit ea4cab8e4c
2 changed files with 41 additions and 5 deletions

View file

@ -1705,7 +1705,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value)
#ifdef Py_USING_UNICODE
if (PyString_Check(name)) {
name = PyUnicode_Decode(PyString_AsString(name), PyBytes_Size(name), NULL, NULL);
name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
if (name == NULL)
return -1;
} else if (!PyUnicode_Check(name)) {