Lines Matching refs:statebytes
906 unsigned char statebytes[1 + MAXENCPENDING*4 + sizeof(self->state.c)]; in _multibytecodec_MultibyteIncrementalEncoder_getstate_impl() local
920 statebytes[0] = (unsigned char)pendingsize; in _multibytecodec_MultibyteIncrementalEncoder_getstate_impl()
921 memcpy(statebytes + 1, pendingbuffer, pendingsize); in _multibytecodec_MultibyteIncrementalEncoder_getstate_impl()
924 statebytes[0] = 0; in _multibytecodec_MultibyteIncrementalEncoder_getstate_impl()
927 memcpy(statebytes+statesize, self->state.c, in _multibytecodec_MultibyteIncrementalEncoder_getstate_impl()
931 return (PyObject *)_PyLong_FromByteArray(statebytes, statesize, in _multibytecodec_MultibyteIncrementalEncoder_getstate_impl()
948 unsigned char statebytes[1 + MAXENCPENDING*4 + sizeof(self->state.c)]; in _multibytecodec_MultibyteIncrementalEncoder_setstate_impl() local
950 if (_PyLong_AsByteArray(statelong, statebytes, sizeof(statebytes), in _multibytecodec_MultibyteIncrementalEncoder_setstate_impl()
956 if (statebytes[0] > MAXENCPENDING*4) { in _multibytecodec_MultibyteIncrementalEncoder_setstate_impl()
961 pending = PyUnicode_DecodeUTF8((const char *)statebytes+1, in _multibytecodec_MultibyteIncrementalEncoder_setstate_impl()
962 statebytes[0], "strict"); in _multibytecodec_MultibyteIncrementalEncoder_setstate_impl()
969 memcpy(self->state.c, statebytes+1+statebytes[0], in _multibytecodec_MultibyteIncrementalEncoder_setstate_impl()
1250 unsigned char statebytes[8]; in _multibytecodec_MultibyteIncrementalDecoder_setstate_impl() local
1258 if (_PyLong_AsByteArray(statelong, statebytes, sizeof(statebytes), in _multibytecodec_MultibyteIncrementalDecoder_setstate_impl()
1280 memcpy(self->state.c, statebytes, sizeof(statebytes)); in _multibytecodec_MultibyteIncrementalDecoder_setstate_impl()