Revert r56044 (which changed the %c format specifier to accept a

unicode char into an int variable) and add %C which does this.
This commit is contained in:
Walter Dörwald 2007-07-01 21:58:22 +00:00
parent 8934fc26c1
commit d09413012c
4 changed files with 21 additions and 2 deletions

View file

@ -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;