python: use right func when PyString_FromStringAndSize is not there

Fixes commit 9d25b4e564.

Thanks to: Matteo Cafasso
This commit is contained in:
Pino Toscano
2017-05-09 17:47:32 +02:00
parent 9d25b4e564
commit f3f99a09ea

View File

@@ -374,7 +374,7 @@ guestfs_int_py_fromstringsize (const char *str, size_t size)
#ifdef HAVE_PYSTRING_ASSTRING
return PyString_FromStringAndSize (str, size);
#else
return PyString_FromStringAndSize (str, size);
return PyUnicode_FromStringAndSize (str, size);
#endif
}