diff Modules/_codecsmodule.c @ 73302:295fdfd4f422

Port UCS1 and charmap codecs to new API.
author Martin v. Löwis <martin@v.loewis.de>
date Wed, 02 Nov 2011 18:02:51 +0100
parents af0800b986b7
children b3e532c1485e
line wrap: on
line diff
--- a/Modules/_codecsmodule.c	Wed Nov 02 12:45:42 2011 +0100
+++ b/Modules/_codecsmodule.c	Wed Nov 02 18:02:51 2011 +0100
@@ -992,11 +992,7 @@
     str = PyUnicode_FromObject(str);
     if (str == NULL)
         return NULL;
-    v = codec_tuple(PyUnicode_EncodeCharmap(
-                               PyUnicode_AS_UNICODE(str),
-                               PyUnicode_GET_SIZE(str),
-                               mapping,
-                               errors),
+    v = codec_tuple(_PyUnicode_EncodeCharmap(str, mapping, errors),
                     PyUnicode_GET_SIZE(str));
     Py_DECREF(str);
     return v;