diff options
| author | 2017-08-10 20:55:06 -0400 | |
|---|---|---|
| committer | 2018-12-17 00:58:06 +0100 | |
| commit | 9c8d7a6c44b0eb22ac77ca6ca5c7c29edd5f685e (patch) | |
| tree | 2423ffbee0f44da7dca9f39b532458ef9d8b8db0 /cython/plist.pyx | |
| parent | ac3be565c413f6964f0188e1c608c1bf8848db29 (diff) | |
| download | libplist-9c8d7a6c44b0eb22ac77ca6ca5c7c29edd5f685e.tar.gz libplist-9c8d7a6c44b0eb22ac77ca6ca5c7c29edd5f685e.tar.bz2 | |
cython: Fix Node.to_bin() decode
Don't convert the string to UTF-8, just bytes.
Fixes #109.
Diffstat (limited to 'cython/plist.pyx')
| -rw-r--r-- | cython/plist.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
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: | |||
| 116 | plist_to_bin(self._c_node, &out, &length) | 116 | plist_to_bin(self._c_node, &out, &length) |
| 117 | 117 | ||
| 118 | try: | 118 | try: |
| 119 | return _from_string_and_size(out, length) | 119 | return bytes(out[:length]) |
| 120 | finally: | 120 | finally: |
| 121 | if out != NULL: | 121 | if out != NULL: |
| 122 | libc.stdlib.free(out) | 122 | libc.stdlib.free(out) |
