[Python-checkins] r45339 - python/trunk/Modules/unicodedata.c
martin.v.loewis
python-checkins at python.org
Thu Apr 13 08:36:31 CEST 2006
Author: martin.v.loewis
Date: Thu Apr 13 08:36:31 2006
New Revision: 45339
Modified:
python/trunk/Modules/unicodedata.c
Log:
Support NFD of very long strings.
Modified: python/trunk/Modules/unicodedata.c
==============================================================================
--- python/trunk/Modules/unicodedata.c (original)
+++ python/trunk/Modules/unicodedata.c Thu Apr 13 08:36:31 2006
@@ -486,8 +486,8 @@
Py_UNICODE *i, *end, *o;
/* Longest decomposition in Unicode 3.2: U+FDFA */
Py_UNICODE stack[20];
- int space, stackptr, isize;
- int index, prefix, count;
+ Py_ssize_t space, isize;
+ int index, prefix, count, stackptr;
unsigned char prev, cur;
stackptr = 0;
@@ -508,7 +508,7 @@
/* Hangul Decomposition adds three characters in
a single step, so we need atleast that much room. */
if (space < 3) {
- int newsize = PyString_GET_SIZE(result) + 10;
+ Py_ssize_t newsize = PyString_GET_SIZE(result) + 10;
space += 10;
if (PyUnicode_Resize(&result, newsize) == -1)
return NULL;
More information about the Python-checkins
mailing list