search for: 2ee7ac5

Displaying 3 results from an estimated 3 matches for "2ee7ac5".

2014 Feb 03
1
[PATCH] hivex: python: value_value no longer generates Unicode strings
...ct *r = PyTuple_New (2); PyTuple_SetItem (r, 0, PyLong_FromLong ((long) t)); - PyTuple_SetItem (r, 1, PyUnicode_DecodeUTF8 (val, len, NULL)); + PyTuple_SetItem (r, 1, PyBytes_FromStringAndSize (val, len)); return r; } diff --git a/python/t/210-setvalue.py b/python/t/210-setvalue.py index 2ee7ac5..8e7ed5c 100644 --- a/python/t/210-setvalue.py +++ b/python/t/210-setvalue.py @@ -19,6 +19,14 @@ import sys import os import hivex +if sys.version >= '3': + import codecs + def b(x): + return codecs.encode(x) +else: + def b(x): + return x + srcdir = os.environ...
2014 Jan 15
0
[PATCH 4/4] hivex: python: Get rid of to_string function in test script
Since values are now returned as strings in Python2 and Python3, treating them as bytes in Python 3 would break tests. --- python/t/210-setvalue.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/python/t/210-setvalue.py b/python/t/210-setvalue.py index 9d93519..2ee7ac5 100644 --- a/python/t/210-setvalue.py +++ b/python/t/210-setvalue.py @@ -47,20 +47,12 @@ h.node_set_value (b, value1) value1 = { "key": "Key1", "t": 3, "value": "JKL" } h.node_set_value (b, value1) -# In Python2, the data is returned as a string...
2014 Jan 15
4
[PATCH 1/4] hivex: Python 2.6 does not have sysconfig.
--- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6785037..203f34f 100644 --- a/configure.ac +++ b/configure.ac @@ -329,8 +329,8 @@ AS_IF([test "x$enable_python" != "xno"], AC_MSG_CHECKING([for Python extension suffix (PEP-3149)]) if test -z "$PYTHON_EXT_SUFFIX"; then