[Python-checkins] r42085 - python/branches/ssize_t/Python/modsupport.c

neal.norwitz python-checkins at python.org
Tue Jan 17 07:55:52 CET 2006


Author: neal.norwitz
Date: Tue Jan 17 07:55:51 2006
New Revision: 42085

Modified:
   python/branches/ssize_t/Python/modsupport.c
Log:
AFAIK, chars are passed as ints on 64-bit arches too.  Since we are formatting a char, this should not lose any bits.

Modified: python/branches/ssize_t/Python/modsupport.c
==============================================================================
--- python/branches/ssize_t/Python/modsupport.c	(original)
+++ python/branches/ssize_t/Python/modsupport.c	Tue Jan 17 07:55:51 2006
@@ -376,7 +376,7 @@
 		case 'c':
 		{
 			char p[1];
-			p[0] = va_arg(*p_va, int);
+			p[0] = (char)va_arg(*p_va, int);
 			return PyString_FromStringAndSize(p, 1);
 		}
 


More information about the Python-checkins mailing list