commit | d09413012cb6b03fdae1439eaacc6076ce09f7b7 | [log] [tgz] |
---|---|---|
author | Walter Dörwald <walter@livinglogic.de> | Sun Jul 01 21:58:22 2007 +0000 |
committer | Walter Dörwald <walter@livinglogic.de> | Sun Jul 01 21:58:22 2007 +0000 |
tree | fb5203b5a4042d60042c89ce8a5c88e19daceb42 | |
parent | 8934fc26c17f6a24d3643e1d4cce6e7ec341e92f [diff] [blame] |
Revert r56044 (which changed the %c format specifier to accept a unicode char into an int variable) and add %C which does this.
diff --git a/Python/modsupport.c b/Python/modsupport.c index ba46409..330da5f 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c
@@ -385,6 +385,12 @@ case 'c': { + char p[1]; + p[0] = (char)va_arg(*p_va, int); + return PyString_FromStringAndSize(p, 1); + } + case 'C': + { int i = va_arg(*p_va, int); Py_UNICODE c; if (i < 0 || i > PyUnicode_GetMax()) {