From 44f72308dacea2ae49d4c33cde897449f591ea7a Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Mon, 2 Oct 2000 03:02:51 +0000 Subject: [PATCH] Fixed Python string handling bug git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@907 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules1.1/python.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SWIG/Source/Modules1.1/python.cxx b/SWIG/Source/Modules1.1/python.cxx index 140668e93..053d7c1d6 100644 --- a/SWIG/Source/Modules1.1/python.cxx +++ b/SWIG/Source/Modules1.1/python.cxx @@ -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);