From d09413012cb6b03fdae1439eaacc6076ce09f7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Sun, 1 Jul 2007 21:58:22 +0000 Subject: Revert r56044 (which changed the %c format specifier to accept a unicode char into an int variable) and add %C which does this. --- Python/modsupport.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Python/modsupport.c') diff --git a/Python/modsupport.c b/Python/modsupport.c index ba464099dd..330da5fe80 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -384,6 +384,12 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) #endif /* WITHOUT_COMPLEX */ 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; -- cgit v1.2.1