summaryrefslogtreecommitdiff
path: root/msgpack/unpack.h
diff options
context:
space:
mode:
Diffstat (limited to 'msgpack/unpack.h')
-rw-r--r--msgpack/unpack.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h
index bbce91c..539a991 100644
--- a/msgpack/unpack.h
+++ b/msgpack/unpack.h
@@ -27,7 +27,6 @@ typedef struct unpack_user {
PyObject *object_hook;
PyObject *list_hook;
PyObject *ext_hook;
- const char *encoding;
const char *unicode_errors;
Py_ssize_t max_str_len, max_bin_len, max_array_len, max_map_len, max_ext_len;
} unpack_user;
@@ -232,9 +231,7 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char*
PyObject *py;
- if (u->encoding) {
- py = PyUnicode_Decode(p, l, u->encoding, u->unicode_errors);
- } else if (u->raw) {
+ if (u->raw) {
py = PyBytes_FromStringAndSize(p, l);
} else {
py = PyUnicode_DecodeUTF8(p, l, u->unicode_errors);