Files
MINGW-packages/mingw-w64-libplist/003-fix-cython-decode.patch
2018-12-11 11:43:45 +03:00

24 lines
749 B
Diff

From 5a8ac7d8ed350eb2f774f34e8194b9ada6d503eb Mon Sep 17 00:00:00 2001
From: Shane Garrett <shane.garrett@hpe.com>
Date: Thu, 10 Aug 2017 20:55:06 -0400
Subject: [PATCH] Issue #109: Fix cython Node.to_bin() decode
Don't convert the string to UTF-8, just bytes.
---
cython/plist.pyx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cython/plist.pyx b/cython/plist.pyx
index b148687..f6696d6 100644
--- a/cython/plist.pyx
+++ b/cython/plist.pyx
@@ -116,7 +116,7 @@ cdef class Node:
plist_to_bin(self._c_node, &out, &length)
try:
- return _from_string_and_size(out, length)
+ return bytes(out[:length])
finally:
if out != NULL:
libc.stdlib.free(out)