[Python-checkins] r43698 - python/trunk/Modules/_ctypes/_ctypes_test.c

thomas.heller python-checkins at python.org
Thu Apr 6 11:03:00 CEST 2006


Author: thomas.heller
Date: Thu Apr  6 11:02:58 2006
New Revision: 43698

Modified:
   python/trunk/Modules/_ctypes/_ctypes_test.c
Log:
Replace a few more 'char' types with 'signed char', to fix test failures
on platforms (ppc debian) where 'char' is unsigned.

Modified: python/trunk/Modules/_ctypes/_ctypes_test.c
==============================================================================
--- python/trunk/Modules/_ctypes/_ctypes_test.c	(original)
+++ python/trunk/Modules/_ctypes/_ctypes_test.c	Thu Apr  6 11:02:58 2006
@@ -51,21 +51,21 @@
 	*presult = a + b;
 }
 
-EXPORT(int) _testfunc_i_bhilfd(char b, short h, int i, long l, float f, double d)
+EXPORT(int) _testfunc_i_bhilfd(signed char b, short h, int i, long l, float f, double d)
 {
 //	printf("_testfunc_i_bhilfd got %d %d %d %ld %f %f\n",
 //	       b, h, i, l, f, d);
 	return (int)(b + h + i + l + f + d);
 }
 
-EXPORT(float) _testfunc_f_bhilfd(char b, short h, int i, long l, float f, double d)
+EXPORT(float) _testfunc_f_bhilfd(signed char b, short h, int i, long l, float f, double d)
 {
 //	printf("_testfunc_f_bhilfd got %d %d %d %ld %f %f\n",
 //	       b, h, i, l, f, d);
 	return (float)(b + h + i + l + f + d);
 }
 
-EXPORT(double) _testfunc_d_bhilfd(char b, short h, int i, long l, float f, double d)
+EXPORT(double) _testfunc_d_bhilfd(signed char b, short h, int i, long l, float f, double d)
 {
 //	printf("_testfunc_d_bhilfd got %d %d %d %ld %f %f\n",
 //	       b, h, i, l, f, d);
@@ -152,13 +152,13 @@
 }
 
 #ifdef HAVE_LONG_LONG
-EXPORT(PY_LONG_LONG) _testfunc_q_bhilfdq(char b, short h, int i, long l, float f,
+EXPORT(PY_LONG_LONG) _testfunc_q_bhilfdq(signed char b, short h, int i, long l, float f,
 				     double d, PY_LONG_LONG q)
 {
 	return (PY_LONG_LONG)(b + h + i + l + f + d + q);
 }
 
-EXPORT(PY_LONG_LONG) _testfunc_q_bhilfd(char b, short h, int i, long l, float f, double d)
+EXPORT(PY_LONG_LONG) _testfunc_q_bhilfd(signed char b, short h, int i, long l, float f, double d)
 {
 	return (PY_LONG_LONG)(b + h + i + l + f + d);
 }


More information about the Python-checkins mailing list