summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-09-01 19:39:01 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-09-01 19:39:01 (GMT)
commit42cb4626820e466177e49c283e37e15375c3efed (patch)
tree0f9df30fa645282eb9a48badb8d70a0e804bca00 /Objects
parente0f9863a613b7e00794475bf4286c1dcf688ac26 (diff)
downloadcpython-42cb4626820e466177e49c283e37e15375c3efed.zip
cpython-42cb4626820e466177e49c283e37e15375c3efed.tar.gz
cpython-42cb4626820e466177e49c283e37e15375c3efed.tar.bz2
Remove unicode_default_encoding constant
Inline its value in PyUnicode_GetDefaultEncoding(). The comment is now outdated (we will not change its value anymore).
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 6012492..9cabd11 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -114,15 +114,6 @@ static PyUnicodeObject *unicode_empty;
shared as well. */
static PyUnicodeObject *unicode_latin1[256];
-/* Default encoding to use and assume when NULL is passed as encoding
- parameter; it is fixed to "utf-8". Always use the
- PyUnicode_GetDefaultEncoding() API to access this global.
-
- Don't forget to alter Py_FileSystemDefaultEncoding if you change the
- hard coded default!
-*/
-static const char unicode_default_encoding[] = "utf-8";
-
/* Fast detection of the most frequent whitespace characters */
const unsigned char _Py_ascii_whitespace[] = {
0, 0, 0, 0, 0, 0, 0, 0,
@@ -1781,7 +1772,7 @@ Py_ssize_t PyUnicode_GetSize(PyObject *unicode)
const char *PyUnicode_GetDefaultEncoding(void)
{
- return unicode_default_encoding;
+ return "utf-8";
}
/* create or adjust a UnicodeDecodeError */