Fixed convert string function in python wrapper.
authorMichel Zou <xantares09@hotmail.com>
Tue, 15 Jan 2013 15:12:56 +0000 (16:12 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 15 Jan 2013 16:52:29 +0000 (17:52 +0100)
bindings/ftdi1.i

index f132162..728a91b 100644 (file)
@@ -9,12 +9,14 @@
 %{
 #include "Python.h"
 
-inline PyObject* convertString( const char *v, Py_ssize_t len )
+PyObject* convertString( const char *v, Py_ssize_t len )
+{
 #if PY_MAJOR_VERSION >= 3
-{ return PyBytes_FromStringAndSize(v, len); }
+  return PyBytes_FromStringAndSize(v, len);
 #else
-{ return PyString_FromStringAndSize(v, len); }
+  return PyString_FromStringAndSize(v, len);
 #endif
+}
 %}
 
 %include <typemaps.i>