[Python-checkins] r42427 - python/trunk/Modules/structmodule.c

tim.peters python-checkins at python.org
Thu Feb 16 21:19:47 CET 2006


Author: tim.peters
Date: Thu Feb 16 21:19:46 2006
New Revision: 42427

Modified:
   python/trunk/Modules/structmodule.c
Log:
struct_pack():  Repair new assert-fail crash in
debug-build test_struct on a box where plain "char"
is signed.


Modified: python/trunk/Modules/structmodule.c
==============================================================================
--- python/trunk/Modules/structmodule.c	(original)
+++ python/trunk/Modules/structmodule.c	Thu Feb 16 21:19:46 2006
@@ -1134,7 +1134,7 @@
 				if (n > 255)
 					n = 255;
 				/* store the length byte */
-				*res++ = Py_SAFE_DOWNCAST(n, Py_ssize_t, char);
+				*res++ = Py_SAFE_DOWNCAST(n, Py_ssize_t, unsigned char);
 				res += num;
 				break;
 			}


More information about the Python-checkins mailing list