[Python-3000-checkins] r55709 - in python/branches/py3k-struni: Include/pyport.h Objects/complexobject.c Objects/floatobject.c
walter.doerwald
python-3000-checkins at python.org
Thu May 31 17:51:36 CEST 2007
Author: walter.doerwald
Date: Thu May 31 17:51:35 2007
New Revision: 55709
Modified:
python/branches/py3k-struni/Include/pyport.h
python/branches/py3k-struni/Objects/complexobject.c
python/branches/py3k-struni/Objects/floatobject.c
Log:
Change float.__str__() and complex.__str__() to return
unicode objects.
Modified: python/branches/py3k-struni/Include/pyport.h
==============================================================================
--- python/branches/py3k-struni/Include/pyport.h (original)
+++ python/branches/py3k-struni/Include/pyport.h Thu May 31 17:51:35 2007
@@ -107,6 +107,7 @@
* PyString_FromFormat
* PyErr_Format
* PyString_FromFormatV
+ * PyUnicode_FromFormatV
*
* Lower-level uses require that you interpolate the correct format modifier
* yourself (e.g., calling printf, fprintf, sprintf, PyOS_snprintf); for
Modified: python/branches/py3k-struni/Objects/complexobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/complexobject.c (original)
+++ python/branches/py3k-struni/Objects/complexobject.c Thu May 31 17:51:35 2007
@@ -350,7 +350,7 @@
{
char buf[100];
complex_to_buf(buf, sizeof(buf), v, PREC_STR);
- return PyString_FromString(buf);
+ return PyUnicode_FromString(buf);
}
static long
Modified: python/branches/py3k-struni/Objects/floatobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/floatobject.c (original)
+++ python/branches/py3k-struni/Objects/floatobject.c Thu May 31 17:51:35 2007
@@ -310,7 +310,7 @@
{
char buf[100];
format_float(buf, sizeof(buf), v, PREC_STR);
- return PyString_FromString(buf);
+ return PyUnicode_FromString(buf);
}
/* Comparison is pretty much a nightmare. When comparing float to float,
More information about the Python-3000-checkins
mailing list