[Python-3000-checkins] r58648 - python/branches/py3k/Objects/unicodeobject.c

guido.van.rossum python-3000-checkins at python.org
Wed Oct 24 23:13:10 CEST 2007


Author: guido.van.rossum
Date: Wed Oct 24 23:13:09 2007
New Revision: 58648

Modified:
   python/branches/py3k/Objects/unicodeobject.c
Log:
Fix a broken format in a PyErr_Format() call: %lx is not supported.
(It's still technically broken since the va_args code assumes %x is
an int while we're passing a long, but that's mostly theoretical,
and it's done all over the place.)


Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c	(original)
+++ python/branches/py3k/Objects/unicodeobject.c	Wed Oct 24 23:13:09 2007
@@ -4703,7 +4703,7 @@
 	long max = PyUnicode_GetMax();
 	if (value < 0 || value > max) {
 	    PyErr_Format(PyExc_TypeError,
-			     "character mapping must be in range(0x%lx)", max+1);
+                         "character mapping must be in range(0x%x)", max+1);
 	    Py_DECREF(x);
 	    return -1;
 	}


More information about the Python-3000-checkins mailing list