Lines Matching defs:object
230 PyObject *args_tuple(PyObject *object,
238 Py_INCREF(object);
239 PyTuple_SET_ITEM(args,0,object);
347 All APIs return a codec object with incremented refcount.
403 /* Encode an object (e.g. a Unicode object) using the given encoding
404 and return the resulting encoded object (usually a Python string).
409 _PyCodec_EncodeInternal(PyObject *object,
417 args = args_tuple(object, errors);
430 "encoder must return a tuple (object, integer)");
449 /* Decode an object (usually a Python string) using the given encoding
450 and return an equivalent object (e.g. a Unicode object).
455 _PyCodec_DecodeInternal(PyObject *object,
463 args = args_tuple(object, errors);
475 "decoder must return a tuple (object,integer)");
495 PyObject *PyCodec_Encode(PyObject *object,
505 return _PyCodec_EncodeInternal(object, encoder, encoding, errors);
508 PyObject *PyCodec_Decode(PyObject *object,
518 return _PyCodec_DecodeInternal(object, decoder, encoding, errors);
590 PyObject *_PyCodec_EncodeText(PyObject *object,
600 return _PyCodec_EncodeInternal(object, encoder, encoding, errors);
603 PyObject *_PyCodec_DecodeText(PyObject *object,
613 return _PyCodec_DecodeInternal(object, decoder, encoding, errors);
756 PyObject *object;
768 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
773 /* object is guaranteed to be "ready" */
774 ch = PyUnicode_READ_CHAR(object, i);
793 Py_DECREF(object);
801 ch = PyUnicode_READ_CHAR(object, i);
841 Py_DECREF(object);
852 PyObject *object;
867 if (!(object = PyUnicodeDecodeError_GetObject(exc)))
869 p = (const unsigned char*)PyBytes_AS_STRING(object);
872 Py_DECREF(object);
885 Py_DECREF(object);
893 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
901 if (!(object = PyUnicodeTranslateError_GetObject(exc)))
912 /* object is guaranteed to be "ready" */
913 c = PyUnicode_READ_CHAR(object, i);
925 Py_DECREF(object);
930 c = PyUnicode_READ_CHAR(object, i);
953 Py_DECREF(object);
963 PyObject *object;
977 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
988 /* object is guaranteed to be "ready" */
989 c = PyUnicode_READ_CHAR(object, i);
1011 c = PyUnicode_READ_CHAR(object, i);
1044 Py_DECREF(object);
1125 PyObject *object;
1141 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
1144 Py_DECREF(object);
1148 Py_DECREF(object);
1157 Py_DECREF(object);
1165 Py_DECREF(object);
1170 /* object is guaranteed to be "ready" */
1171 Py_UCS4 ch = PyUnicode_READ_CHAR(object, i);
1176 Py_DECREF(object);
1209 Py_DECREF(object);
1219 if (!(object = PyUnicodeDecodeError_GetObject(exc)))
1221 p = (const unsigned char*)PyBytes_AS_STRING(object);
1223 Py_DECREF(object);
1227 Py_DECREF(object);
1236 Py_DECREF(object);
1243 if (PyBytes_GET_SIZE(object) - start >= bytelength) {
1268 Py_DECREF(object);
1289 PyObject *object;
1301 if (!(object = PyUnicodeEncodeError_GetObject(exc)))
1305 Py_DECREF(object);
1310 /* object is guaranteed to be "ready" */
1311 Py_UCS4 ch = PyUnicode_READ_CHAR(object, i);
1316 Py_DECREF(object);
1323 Py_DECREF(object);
1335 if (!(object = PyUnicodeDecodeError_GetObject(exc)))
1337 p = (const unsigned char*)PyBytes_AS_STRING(object);
1345 Py_DECREF(object);