projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13870b1
)
Use correct PyArg_Parse format char for Py_ssize_t in unicode.center().
author
Thomas Wouters
<thomas@python.org>
Thu, 16 Feb 2006 19:34:37 +0000
(19:34 +0000)
committer
Thomas Wouters
<thomas@python.org>
Thu, 16 Feb 2006 19:34:37 +0000
(19:34 +0000)
Fixes:
>>> u"".center(10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError
on 64-bit systems.
Objects/unicodeobject.c
patch
|
blob
|
history
diff --git
a/Objects/unicodeobject.c
b/Objects/unicodeobject.c
index eaf98372c8ee8e37ff120af9466e8f9b3b870190..d353f1fc7aa98d8ea821feed6282dc929bdc7769 100644
(file)
--- a/
Objects/unicodeobject.c
+++ b/
Objects/unicodeobject.c
@@
-4853,7
+4853,7
@@
unicode_center(PyUnicodeObject *self, PyObject *args)
Py_ssize_t width;
Py_UNICODE fillchar = ' ';
- if (!PyArg_ParseTuple(args, "
i
|O&:center", &width, convert_uc, &fillchar))
+ if (!PyArg_ParseTuple(args, "
n
|O&:center", &width, convert_uc, &fillchar))
return NULL;
if (self->length >= width && PyUnicode_CheckExact(self)) {