[Python-3000-checkins] r56134 - python/branches/py3k-struni/Modules/arraymodule.c

guido.van.rossum python-3000-checkins at python.org
Sun Jul 1 01:44:36 CEST 2007


Author: guido.van.rossum
Date: Sun Jul  1 01:44:36 2007
New Revision: 56134

Modified:
   python/branches/py3k-struni/Modules/arraymodule.c
Log:
Fix a failure that was only apparent on big-endian machines:
the argument corresponding to 'c' in PyArg_ParseTuple() must be an int,
not a char!  (This is new -- Walter Doerwald changed it in r56044.
Note sure this was a good idea.)

Also removed a debug printf() call that was causing compiler warnings.


Modified: python/branches/py3k-struni/Modules/arraymodule.c
==============================================================================
--- python/branches/py3k-struni/Modules/arraymodule.c	(original)
+++ python/branches/py3k-struni/Modules/arraymodule.c	Sun Jul  1 01:44:36 2007
@@ -1208,7 +1208,6 @@
 	}
 
 	if (PyBytes_GET_SIZE(b) != nbytes) {
-		printf("nbytes = %d, len(b) == %d\n", nbytes, PyBytes_GET_SIZE(b));
 		PyErr_SetString(PyExc_EOFError,
 				"read() didn't return enough bytes");
 		Py_DECREF(b);
@@ -1779,7 +1778,7 @@
 static PyObject *
 array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	char c;
+	int c;
 	PyObject *initial = NULL, *it = NULL;
 	struct arraydescr *descr;
 	


More information about the Python-3000-checkins mailing list