summaryrefslogtreecommitdiffstats
path: root/Modules/_json.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-10-07 18:55:35 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-10-07 18:55:35 (GMT)
commitc47adb04b30feea670e87b28efb286db11babaa6 (patch)
tree7b7a3c7fa6227d578a4f1bddac23163170a95c10 /Modules/_json.c
parentdd07732af5793d7cd6fcd59c470f519709ff3eec (diff)
downloadcpython-c47adb04b30feea670e87b28efb286db11babaa6.zip
cpython-c47adb04b30feea670e87b28efb286db11babaa6.tar.gz
cpython-c47adb04b30feea670e87b28efb286db11babaa6.tar.bz2
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r--Modules/_json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index 0f550c1..e49d1b2 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -365,7 +365,7 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next
APPEND_OLD_CHUNK
chunk = PyUnicode_FromKindAndData(
kind,
- (char*)buf + PyUnicode_KIND_SIZE(kind, end),
+ (char*)buf + kind * end,
next - end);
if (chunk == NULL) {
goto bail;
@@ -931,7 +931,7 @@ _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_
if (custom_func) {
/* copy the section we determined to be a number */
numstr = PyUnicode_FromKindAndData(kind,
- (char*)str + PyUnicode_KIND_SIZE(kind, start),
+ (char*)str + kind * start,
idx - start);
if (numstr == NULL)
return NULL;