s/raw_as_bytes/raw/g (#276)

fixes #273
This commit is contained in:
INADA Naoki 2018-01-12 19:22:36 +09:00 committed by GitHub
parent d9ec8fc905
commit 5569a4efcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 47 deletions

View file

@ -21,7 +21,7 @@
typedef struct unpack_user {
bool use_list;
bool raw_as_bytes;
bool raw;
bool has_pairs_hook;
PyObject *object_hook;
PyObject *list_hook;
@ -229,7 +229,7 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char*
if (u->encoding) {
py = PyUnicode_Decode(p, l, u->encoding, u->unicode_errors);
} else if (u->raw_as_bytes) {
} else if (u->raw) {
py = PyBytes_FromStringAndSize(p, l);
} else {
py = PyUnicode_DecodeUTF8(p, l, NULL);