Lines Matching defs:encoding
7 const char *encoding, const char *errors);
13 static const char * const _keywords[] = {"source", "encoding", "errors", NULL};
20 const char *encoding = NULL;
38 _PyArg_BadArgument("bytearray", "argument 'encoding'", "str", fastargs[1]);
42 encoding = PyUnicode_AsUTF8AndSize(fastargs[1], &encoding_length);
43 if (encoding == NULL) {
46 if (strlen(encoding) != (size_t)encoding_length) {
68 return_value = bytearray___init___impl((PyByteArrayObject *)self, arg, encoding, errors);
821 "decode($self, /, encoding=\'utf-8\', errors=\'strict\')\n"
824 "Decode the bytearray using the codec registered for encoding.\n"
826 " encoding\n"
827 " The encoding with which to decode the bytearray.\n"
839 bytearray_decode_impl(PyByteArrayObject *self, const char *encoding,
846 static const char * const _keywords[] = {"encoding", "errors", NULL};
850 const char *encoding = NULL;
862 _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]);
866 encoding = PyUnicode_AsUTF8AndSize(args[0], &encoding_length);
867 if (encoding == NULL) {
870 if (strlen(encoding) != (size_t)encoding_length) {
892 return_value = bytearray_decode_impl(self, encoding, errors);