commit | c4f281eba3f2b33bc0a7d7172c44f3d1237c09b3 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Tue Oct 11 22:11:42 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Tue Oct 11 22:11:42 2011 +0200 |
tree | 6fb8eb484f53393c9b3fa2f6aa8a00d9c62c2135 | |
parent | ed2682be2f6de05ead5f777ed3aaee92180df4f9 [diff] [blame] |
Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead
diff --git a/Modules/_json.c b/Modules/_json.c index e49d1b2..5a79294 100644 --- a/Modules/_json.c +++ b/Modules/_json.c
@@ -837,7 +837,7 @@ /* rval = parse_constant(constant) */ rval = PyObject_CallFunctionObjArgs(s->parse_constant, cstr, NULL); - idx += PyUnicode_GET_SIZE(cstr); + idx += PyUnicode_GET_LENGTH(cstr); Py_DECREF(cstr); *next_idx_ptr = idx; return rval;