forked from pool/libguestfs
30 lines
814 B
Diff
30 lines
814 B
Diff
|
From f3f99a09eadb17bd80d5939ea00499da5ee1408e Mon Sep 17 00:00:00 2001
|
||
|
From: Pino Toscano <ptoscano@redhat.com>
|
||
|
Date: Tue, 9 May 2017 17:47:32 +0200
|
||
|
Subject: [PATCH] python: use right func when PyString_FromStringAndSize is not
|
||
|
there
|
||
|
|
||
|
Fixes commit 9d25b4e56471f9c33ea6229a8b620fc800c240f8.
|
||
|
|
||
|
Thanks to: Matteo Cafasso
|
||
|
---
|
||
|
python/handle.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/python/handle.c b/python/handle.c
|
||
|
index f347c00d1..88024e184 100644
|
||
|
--- a/python/handle.c
|
||
|
+++ b/python/handle.c
|
||
|
@@ -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
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.13.2
|
||
|
|