Lines Matching defs:codec
23 codec search function.
112 /* Lookup the given encoding and return a tuple providing the codec
119 If no codec is found, a LookupError is set and NULL returned.
165 "no codec search functions registered: "
186 "codec search functions must return 4-tuples");
253 /* Helper function to get a codec item */
270 /* Helper functions to create an incremental codec. */
304 /* Helper function to create a stream codec. */
347 All APIs return a codec object with incremented refcount.
388 * codec that was invoked to trigger the failure without changing the type
399 _PyErr_TrySetFromCause("%s with '%s' codec failed",
525 PyObject *codec;
529 codec = _PyCodec_Lookup(encoding);
530 if (codec == NULL)
537 if (!PyTuple_CheckExact(codec)) {
538 if (_PyObject_LookupAttr(codec, &_Py_ID(_is_text_encoding), &attr) < 0) {
539 Py_DECREF(codec);
546 Py_DECREF(codec);
558 return codec;
567 PyObject *codec;
570 codec = _PyCodec_LookupTextEncoding(encoding, alternate_command);
571 if (codec == NULL)
574 v = PyTuple_GET_ITEM(codec, index);
576 Py_DECREF(codec);
617 name. This function will be called by the codec when it encounters
670 PyErr_SetString(PyExc_TypeError, "codec must pass exception instance");
1241 there are more, let the codec call us again. */
1347 /* codec complained about ASCII byte. */