diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-01 18:54:56 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-01 18:54:56 +0000 |
commit | dbbf653e5e7d790fce009f7c31b6ebbdc408b938 (patch) | |
tree | 7fc4019fda2eaf9f5cc8cf093e21128235fff78a /Python/sysmodule.c | |
parent | a3e883f7819ba7b5e87d176f1fd4ccab09416b3a (diff) | |
download | cpython-dbbf653e5e7d790fce009f7c31b6ebbdc408b938.tar.gz |
Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 013f5f1a9b..90c165a495 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -183,24 +183,6 @@ implementation." ); static PyObject * -sys_setdefaultencoding(PyObject *self, PyObject *args) -{ - char *encoding; - if (!PyArg_ParseTuple(args, "s:setdefaultencoding", &encoding)) - return NULL; - if (PyUnicode_SetDefaultEncoding(encoding)) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -PyDoc_STRVAR(setdefaultencoding_doc, -"setdefaultencoding(encoding)\n\ -\n\ -Set the current default string encoding used by the Unicode implementation." -); - -static PyObject * sys_getfilesystemencoding(PyObject *self) { if (Py_FileSystemDefaultEncoding) @@ -1030,8 +1012,6 @@ static PyMethodDef sys_methods[] = { #ifdef USE_MALLOPT {"mdebug", sys_mdebug, METH_VARARGS}, #endif - {"setdefaultencoding", sys_setdefaultencoding, METH_VARARGS, - setdefaultencoding_doc}, {"setfilesystemencoding", sys_setfilesystemencoding, METH_VARARGS, setfilesystemencoding_doc}, {"setcheckinterval", sys_setcheckinterval, METH_VARARGS, |