Mercurial > cpython-lru_cache-weakref
comparison Python/codecs.c @ 53966:7c29bfbfd352
Rename utf8b error handler to surrogateescape.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sun, 10 May 2009 08:15:24 +0000 |
| parents | fbcdae3e0ca1 |
| children | b085fd0611de |
comparison
equal
deleted
inserted
replaced
| 53965:fbcdae3e0ca1 | 53966:7c29bfbfd352 |
|---|---|
| 828 return NULL; | 828 return NULL; |
| 829 } | 829 } |
| 830 } | 830 } |
| 831 | 831 |
| 832 static PyObject * | 832 static PyObject * |
| 833 PyCodec_UTF8bErrors(PyObject *exc) | 833 PyCodec_SurrogateEscapeErrors(PyObject *exc) |
| 834 { | 834 { |
| 835 PyObject *restuple; | 835 PyObject *restuple; |
| 836 PyObject *object; | 836 PyObject *object; |
| 837 Py_ssize_t start; | 837 Py_ssize_t start; |
| 838 Py_ssize_t end; | 838 Py_ssize_t end; |
| 938 static PyObject *surrogatepass_errors(PyObject *self, PyObject *exc) | 938 static PyObject *surrogatepass_errors(PyObject *self, PyObject *exc) |
| 939 { | 939 { |
| 940 return PyCodec_SurrogatePassErrors(exc); | 940 return PyCodec_SurrogatePassErrors(exc); |
| 941 } | 941 } |
| 942 | 942 |
| 943 static PyObject *utf8b_errors(PyObject *self, PyObject *exc) | 943 static PyObject *surrogateescape_errors(PyObject *self, PyObject *exc) |
| 944 { | 944 { |
| 945 return PyCodec_UTF8bErrors(exc); | 945 return PyCodec_SurrogateEscapeErrors(exc); |
| 946 } | 946 } |
| 947 | 947 |
| 948 static int _PyCodecRegistry_Init(void) | 948 static int _PyCodecRegistry_Init(void) |
| 949 { | 949 { |
| 950 static struct { | 950 static struct { |
| 999 surrogatepass_errors, | 999 surrogatepass_errors, |
| 1000 METH_O | 1000 METH_O |
| 1001 } | 1001 } |
| 1002 }, | 1002 }, |
| 1003 { | 1003 { |
| 1004 "utf8b", | 1004 "surrogateescape", |
| 1005 { | 1005 { |
| 1006 "utf8b", | 1006 "surrogateescape", |
| 1007 utf8b_errors, | 1007 surrogateescape_errors, |
| 1008 METH_O | 1008 METH_O |
| 1009 } | 1009 } |
| 1010 } | 1010 } |
| 1011 }; | 1011 }; |
| 1012 | 1012 |
