Fixed Python string handling bug

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@907 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-10-02 03:02:51 +00:00
commit 44f72308da

View file

@ -569,7 +569,7 @@ PYTHON::create_function(char *name, char *iname, SwigType *d, ParmList *l) {
SwigType_del_pointer(d);
break;
case T_STRING:
Printf(f->code," resultobj = PyString_FromString(result);\n");
Printf(f->code," resultobj = Py_BuildValue(\"s\",result);\n");
break;
case T_POINTER: case T_ARRAY: case T_REFERENCE:
SwigType_remember(d);