summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-22 01:27:30 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-22 01:27:30 (GMT)
commit9d3b93ba305e8a83bf1cec5146def2078e40b1a5 (patch)
treed618d2ca564f2a027522b22491f4fec656fceb09 /Objects/abstract.c
parentb84d723509d1b8c7e052f61117624627d334cf30 (diff)
downloadcpython-9d3b93ba305e8a83bf1cec5146def2078e40b1a5.zip
cpython-9d3b93ba305e8a83bf1cec5146def2078e40b1a5.tar.gz
cpython-9d3b93ba305e8a83bf1cec5146def2078e40b1a5.tar.bz2
Use the new Unicode API
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0) * Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len) * Replace Py_UNICODE by wchar_t * posix_putenv() uses PyUnicode_FromFormat() to create the string, instead of PyUnicode_FromUnicode() + _snwprintf()
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index bce9794..39f1a26 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -701,7 +701,7 @@ PyObject_Format(PyObject *obj, PyObject *format_spec)
/* If no format_spec is provided, use an empty string */
if (format_spec == NULL) {
- empty = PyUnicode_FromUnicode(NULL, 0);
+ empty = PyUnicode_New(0, 0);
format_spec = empty;
}